Re: Why count(*) doest use index?

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>, Allan Kamau <kamauallan(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org, John R Pierce <pierce(at)hogranch(dot)com>
Subject: Re: Why count(*) doest use index?
Date: 2011-03-07 19:36:27
Message-ID: AANLkTimhgZbDAKMpEPJEqe7qpYFj4rQBsqO_GN=81jA_@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Mar 6, 2011 at 3:41 AM, Martijn van Oosterhout
<kleptog(at)svana(dot)org> wrote:
> The other option is visibility data in the index. Doubles the size of
> your indexes though.

Also requires both table and index be locked while you update both so
you don't get race conditions. so has a real performance impact there
as well.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Aleksey Tsalolikhin 2011-03-07 20:04:02 Re: Web Hosting
Previous Message Bill Thoen 2011-03-07 19:32:46 Re: Logic AND between some strings