Re: Tuning to speed select

From: Tom Laudeman <twl8n(at)virginia(dot)edu>
To: Reece Hart <reece(at)harts(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Tuning to speed select
Date: 2006-08-10 15:00:00
Message-ID: 44DB49F0.9070608@virginia.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Reece,
We have some multi-column indexes. Speed of insert, update, and delete
are not an issue since this data is essentially static: write-once,
read-many.

As far as I can tell (from running actual tests) Postgres will not use a
multi-column index when the SELECT is constraining on only one of the
columns in the index. If I need a single column index, I create one. If
I need three columns in an index, I create a specific 3 column index.
Granted, my memory is fuzzy, and some of my testing was done on version
7.x and there may be improvements on version 8.x

-Tom

> ...
>
> I found multi-column indexes and clustering to be extremely beneficial
> in 7.4. I still use them in 8.1, but I haven't compared them
> extensively with equivalent queries that use bitmap index scans. The
> obvious downside of having more indexes is the additional time and
> space overhead during insert, update, or delete.
>
> ...
>
> -Reece
>
>--
>Reece Hart, http://harts.net/reece/, GPG:0x25EC91A0
>
>

--
Tom Laudeman
twl8n(at)virginia(dot)edu
(434) 924-2456
http://www.people.virginia.edu/~twl8n/
http://laudeman.com/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Junkone 2006-08-10 15:06:00 How to do auto numbering on INT column
Previous Message Andy Foster 2006-08-10 14:37:10 CURRENT_TIMESTAMP wierd behaviour