#11 Remove SELECT COUNT(*) from Pager

open
nobody
None
5
2009-07-16
2009-07-16
Anonymous
No

I have been using the pager to generate grids , using Postgresql, I noticed that it issues two queries per pager request :

1. SELECT COUNT(*) FROM ( SELECT * orders )_ADODB_ALIAS_
2. SELECT * orders

The issue is for long running queries the combination of the SELECT COUNT(*) plus the SELECT, causes slow rendering times.. I have tried turning off the record count feature in pager, but this yields multiple SELECT queries as pager tries to figure out what the paging list it is on...

Is there a way to tell PAGER to simply display ALL the records on one list (No paging) and omit the SELECT COUNT(*) , I could do this with the base select, but am using pager in conjunction with JavaScript grid components.

Discussion