$sQueryUpdateTime = "select intUpdateTime from tblStudies " . $where . " ORDER BY intUpdateTime DESC limit 1";
$rs = mysqli_query($conn, $sQueryUpdateTime);
$row = mysqli_fetch_assoc($rs);
the above used to take 300+ ms. to query. Then I set it as index and takes 30 ms. Cool.
$sQuery = "select * from tblStudies " . $where . " ORDER BY StudyDate DESC limit $offset,$rows";
// takes 30 ms. on the indexed int
$sQuery = "select * from tblStudies " . $where . " ORDER BY StudyDate DESC , PatientName ASC limit $offset,$rows";