Re: intercepting where clause on a view or other performance tweak

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Russell Keane <Russell(dot)Keane(at)inps(dot)co(dot)uk>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: intercepting where clause on a view or other performance tweak
Date: 2012-11-16 15:41:45
Message-ID: 15097.1353080505@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Russell Keane <Russell(dot)Keane(at)inps(dot)co(dot)uk> writes:
> Sorry, I should've added that in the original description.
> I have an index on search_key and it's never used.

Did you pay attention to the point about the nondefault operator class?
If the LIKE pattern is left-anchored and as selective as your example
implies, the planner certainly ought to try to use a compatible index.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Craig James 2012-11-16 16:32:24 Re: PostgreSQL strange query plan for my query
Previous Message Russell Keane 2012-11-16 15:22:14 Re: intercepting where clause on a view or other performance tweak