too many select

Questionstoo many select
Massimo Gagliardi asked 8 years ago

Hi Abu
I noted that, investigating with a debug, in a my grid that has more subgrids the select_command of the subgrid is executed until 4 times, slowing much execution time.
There is a motif that i don't know?
How can I do?
Thanks in advance
Massimo Gagliardi

3 Answers
Abu Ghufran answered 8 years ago


Each grid is loaded using 3 select calls.
First query is executed when grid structure is form. Query returns the column meta data. It is run once query.
For each data request, 2 select queries are executed. One for total count of records, and one for paginated data.

If using subgrid, same applies for each grid display and this cannot be reduced according to our dev team.

What i suggest now is to monitor the queries by enabling mysql query logs and optimize them by creating indexes on possible search fields.

Massimo Gagliardi answered 8 years ago

I also use my query to obtain the total count of records.
Is't possible catch the value of jqgrid_dist instead do another query?
If yes how?
Thanks in advance

Abu Ghufran answered 8 years ago

No, it's not doable in current version.

Your Answer

8 + 17 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.

How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?