On Tue, 2006-08-29 at 15:52 +0200, Willo van der Merwe wrote: > (cost=0.00..51848.56 rows=1309356 width=0) It is going through way more number of rows than what is returned by the count(*). It appears that you need to VACUUM the table (not VACUUM ANALYZE).