From: | Mario Splivalo <mario(dot)splivalo(at)megafon(dot)hr> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Postgres not willing to use an index? |
Date: | 2009-02-09 09:28:15 |
Message-ID: | 498FF72F.3000808@megafon.hr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Tom Lane wrote:
>
> Hardly surprising --- a search on the index's lowest-order column would
> require scanning practically all of the index. (If you think about the
> ordering of the index entries you'll see why.) If this is a typical
> query then you need a separate index on transaction_time_commit.
Yes, actually I just moved transaction_time_commit column to the
begining of the index, since, most of the time I run queries based on
transaction_time_commit and then transaction_client_id and
transaction_destination_id.
> The fine manual goes into some detail about how to design indexes;
> http://www.postgresql.org/docs/8.3/static/indexes.html
> particularly 11.3, 11.5.
I see it now. I read the manual concerning CREATE INDEX command, and
there is no mention of multicolumn indices, did not notice Note that
points to Chapter 11.
Mike
From | Date | Subject | |
---|---|---|---|
Next Message | Mario Splivalo | 2009-02-09 09:40:45 | Re: Postgres not willing to use an index? |
Previous Message | Grzegorz Jaśkiewicz | 2009-02-08 19:37:33 | Re: inheritance, and plans |