I have some resource intensive queries that run and populate in the grid (30+ seconds). When the user click on the link to load these pages, it takes nearly 30 seconds for the grid to even show up, and another 30 seconds of it saying "Loading" before it displays data.
I eventually discovered that the source code issues the same query I have, with a "LIMIT 1" on the end; and it looks like this is done to get the column names and data types. If this is the case, why not use "LIMIT 0" so it will return instantly?
I change my jqgrid_dist.php to this and the grid loads and displays in 1/2 the time (30 seconds!). Is this not viable for other DB's or something? Why not do this all the time?
Hi,
I agree with your idea, you can search / replace jqgrid_dist.php
if(!$cols || $change_field)
{
$sql = $this->select_command . " LIMIT 0 OFFSET 0";
$sql = $this->prepare_sql($sql,$this->db_driver);
…
}
I have tested and this works with mysql. We will need more database checking to incorporate in release build.