From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dan Langille <dan@langille.org>
Cc: pgsql-sql@postgresql.org
Subject: Re: subselect instead of a view...
Date: Tue, 26 Nov 2002 00:29:29 -0500
Message-ID: <6003.1038288569@sss.pgh.pa.us> (raw)
In-Reply-To: <3DE2BB41.18930.D5AA1552@localhost>
References: <3DE2BB41.18930.D5AA1552@localhost>
"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.
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-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, dan@langille.org
Subject: Re: subselect instead of a view...
In-Reply-To: <6003.1038288569@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