Em 17/09/2012 06:13, Chris Travers
escreveu:
I'm just a little bit curious, and since count(*) affects a lot my applications (every web system has a paginating feature that depends on count(*) to calculate number of pages without loading everything), I'm also interested in this topic. The wiki page in question has been updated today, and I see the alert in top of page "Note that the following article only applies to versions of PostgreSQL prior to 9.2. Index-only scans are now implemented." So seems that traversing indexes for count(*) would be faster on 9.2, right? AFAIK, for count(*) doesn't matter the order data is stored - just need to load index leaf pages and count from there, right? Edson |