Re: index - Mailing list pgsql-performance

From David Wilson
Subject Re: index
Date
Msg-id e7f9235d0901132216w39bd2083ld56a03a70f1035c1@mail.gmail.com
Whole thread Raw
In response to index  ("Maksim Sosnovskiy" <msosno01@gmail.com>)
List pgsql-performance
On Wed, Jan 14, 2009 at 12:53 AM, Maksim Sosnovskiy <msosno01@gmail.com> wrote:
Will it be more efficient to also add index on IP
> Address to speedup lookups by IP?

Most likely, especially if the IP address is not the first column in
your primary key index.

Have you done an explain analyze of your ip lookup query? If not, do
so; that can help. Then try creating the index and explain analyze the
query again to see what happens.

Knowing your existing schema/indices and such would let us do more
than guess- and not knowing the plan your current query is using makes
it difficult to know if there's a better one using a to-be-created
index.
--
- David T. Wilson
david.t.wilson@gmail.com

pgsql-performance by date:

Previous
From: "Maksim Sosnovskiy"
Date:
Subject: index
Next
From: Heikki Linnakangas
Date:
Subject: Re: Slow insert performace, 8.3 Wal related?