Skip site navigation (1) Skip section navigation (2)

Re: select count(*) and limit

From: Verena Ruff <lists(at)triosolutions(dot)at>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: select count(*) and limit
Date: 2006-05-18 16:28:31
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice

Sean Davis schrieb:
> It should still work just fine, again with the caveat that it is an
> approximation and depends on the statistics available.  Try comparing the
> output a few times for your count(*) and using EXPLAIN.
sometimes the difference is to much to go this way. EXPLAIN extimates 
71000 rows but there are 95000. 10% would have been accaptle. I did 
these tests on a freshly vacuumed database.


In response to


pgsql-novice by date

Next:From: Sean DavisDate: 2006-05-18 19:10:36
Subject: Re: select count(*) and limit
Previous:From: Verena RuffDate: 2006-05-18 15:45:34
Subject: Re: select count(*) and limit

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group