Re: Postgresql simple query performance question

From: Richard Huxton <dev(at)archonet(dot)com>
To: Reg Me Please <regmeplease(at)gmail(dot)com>
Cc: Bill Moran <wmoran(at)potentialtech(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Postgresql simple query performance question
Date: 2007-11-06 15:15:17
Message-ID: 47308505.3080201@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Reg Me Please wrote:
> While I would not spend resources in fine tuning the count(*), I would
> spend some to underastand why and how the other ones do it better.
>
> Just to be better.

The problem is well understood, and there is extensive discussion in the
mailing lists archives. The basic problem is that with PG's
implementation of MVCC the indexes don't have row visibility
information. The simple solution of adding it to every index entry would
increase index size substantially imposing costs on every index access
and update.

There's a thread in -hackers called "Visibility map thoughts" that is
looking at the situation again and if/how to implement visibility
information in a compact form.

--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Eric Johnson 2007-11-06 15:15:20 How to find non-unique indexes in system tables
Previous Message Scott Marlowe 2007-11-06 15:09:42 Re: Copy the database..