From: | "David Wilson" <david(dot)t(dot)wilson(at)gmail(dot)com> |
---|---|
To: | "Maksim Sosnovskiy" <msosno01(at)gmail(dot)com> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: index |
Date: | 2009-01-14 06:16:13 |
Message-ID: | e7f9235d0901132216w39bd2083ld56a03a70f1035c1@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Wed, Jan 14, 2009 at 12:53 AM, Maksim Sosnovskiy <msosno01(at)gmail(dot)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(dot)t(dot)wilson(at)gmail(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2009-01-14 10:10:17 | Re: Slow insert performace, 8.3 Wal related? |
Previous Message | Maksim Sosnovskiy | 2009-01-14 05:53:52 | index |