| From: | Mark kirkwood <markir(at)slingshot(dot)co(dot)nz> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: How Postgresql.... Putting Count(*) To Bed (Hopefully) |
| Date: | 2001-07-23 08:24:46 |
| Message-ID: | 01072320244600.01081@spikey.slithery.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Sunday 22 July 2001 15:49, you wrote:
> Mark kirkwood <markir(at)slingshot(dot)co(dot)nz> writes:
> > I have not tried to see if it makes any difference in Postgresql...
>
> Postgres converts count(*) to count(1) at the grammar stage (cf. gram.y,
> about line 4817 in current sources). So if you think you detect any
> performance difference, you're surely hallucinating...
>
> regards, tom lane
It seemed appropriate to test my "experimental method" with this example :
I measured elapsed times for count(*), count(1) ....
I can (with some relief) report elapsed times for both at 1m01, with a
variation of 1 s for both measurements ...
thanks for everyboys patience here...
Mark
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Hiroshi Inoue | 2001-07-23 08:55:27 | Re: Hangs with 7.1.2 and vacuum |
| Previous Message | Stephen Robert Norris | 2001-07-23 08:20:37 | Hangs with 7.1.2 and vacuum |