"Dan Langille" <[EMAIL PROTECTED]> 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

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

Reply via email to