From: Dan Langille <dan@langille.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-sql@postgresql.org
Subject: Re: subselect instead of a view...
Date: Tue, 26 Nov 2002 10:17:26 -0500
Message-ID: <3DE34A36.29690.D7D88D0C@localhost> (raw)
In-Reply-To: <6003.1038288569@sss.pgh.pa.us>
References: <3DE2BB41.18930.D5AA1552@localhost>
On 26 Nov 2002 at 0:29, Tom Lane wrote:
> "Dan Langille" <dan@langille.org> writes:
> > SELECT E.name, EP.pathname, E.id, EP2.pathname, CL.id
> > ...
> > and EP2.pathname like EP.pathname || '/%'
>
> > I am still suspicous of that like. It seems to be the performance
> > killer here. There is an index which can be used:
>
> It won't be, though. The LIKE-to-indexscan transformation happens at
> plan time, and that means it can only happen if the pattern is a
> constant. Which it surely will not be in your example.
Thanks. I'll see if I can come up with something else to do this.
--
Dan Langille : http://www.langille.org/
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-sql@postgresql.org
Cc: dan@langille.org, tgl@sss.pgh.pa.us
Subject: Re: subselect instead of a view...
In-Reply-To: <3DE34A36.29690.D7D88D0C@localhost>
* 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