From: Tom Lane <tgl@sss.pgh.pa.us>
To: Russell Keane <Russell.Keane@inps.co.uk>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: intercepting where clause on a view or other performance tweak
Date: Fri, 16 Nov 2012 10:41:45 -0500
Message-ID: <15097.1353080505@sss.pgh.pa.us> (raw)
In-Reply-To: <8D0E5D045E36124A8F1DDDB463D548557D0CDC68C0@mxsvr1.is.inps.co.uk>
References: <8D0E5D045E36124A8F1DDDB463D548557D0CDC68A8@mxsvr1.is.inps.co.uk>
<14368.1353078307@sss.pgh.pa.us>
<8D0E5D045E36124A8F1DDDB463D548557D0CDC68C0@mxsvr1.is.inps.co.uk>
Russell Keane <Russell.Keane@inps.co.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, Russell.Keane@inps.co.uk
Subject: Re: intercepting where clause on a view or other performance tweak
In-Reply-To: <15097.1353080505@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox