Read the link of Niphold that were broken and it seems that the slow counting is gone in Postgres 9.2
Richard On Mon, May 6, 2013 at 9:34 AM, Richard Vézina <[email protected]>wrote: > http://wiki.postgresql.org/wiki/Slow_Counting > > > On Mon, Apr 23, 2012 at 6:53 AM, Niphlod <[email protected]> wrote: > >> unfortunately counting on postgres is a heavy operation, and it's pretty >> "famous" for this http://wiki.postgresql.org/wiki/Slow_Counting......... >> maybe you can try limiting the amount to, let's say, 20000 (if it's >> possible as per requirements of your app) and see if there are differences. >> >> In theory >> >> SELECT COUNT(*) from mytable >> >> and >> >> SELECT COUNT(*) from mytable LIMIT 20000 >> >> for a 500000 records table is faster. >> >> You could have a "default" grid of the 20000 records and then an >> "advanced" if users are willing to scroll over the n-thousand-x page. >> > > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

