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

Re: So, is COUNT(*) fast now?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: So, is COUNT(*) fast now?
Date: 2011-10-28 18:48:54
Message-ID: (view raw or whole thread)
Lists: pgsql-hackers
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> I also tried changing the BufferIsValid() tests in
> visibilitymap_test() to use BufferIsInvalid() instead, with the sense
> of the tests reversed (see attached vismap-test-invalid.patch).  Since
> BufferIsInvalid() just checks for InvalidBuffer instead of also doing
> the sanity checks, it's significantly cheaper.  This also reduced the
> time to about 330 ms, so seems clearly worth doing.

Hmm.  I wonder whether it wouldn't be better to get rid of the range
checks in BufferIsValid, or better convert them into Asserts.  It seems
less than intuitive that BufferIsValid and BufferIsInvalid aren't simple

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Robert HaasDate: 2011-10-28 18:51:28
Subject: Re: So, is COUNT(*) fast now?
Previous:From: Robert HaasDate: 2011-10-28 18:46:52
Subject: Re: Include commit identifier in version() function

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