Re: [PERFORM] LIKE query problem

2006-09-18 Thread Marc McIntyre
Thanks Tom, Is that documented somewhere? I can't seem to see any mention of it in the docs. Tom Lane wrote: Marc McIntyre <[EMAIL PROTECTED]> writes: ... Is there a way to perform this efficiently in one query ? No, because you're hoping for an indexscan optimization of a LIKE que

Re: [PERFORM] LIKE query problem

2006-09-18 Thread Tom Lane
Marc McIntyre <[EMAIL PROTECTED]> writes: > ... Is there a way to perform this efficiently in one query ? No, because you're hoping for an indexscan optimization of a LIKE query, and that can only happen if the pattern is a plan-time constant. regards, tom lane --

[PERFORM] LIKE query problem

2006-09-18 Thread Marc McIntyre
I'm having a problem with a simple query, that finds children of a node, using a materialized path to the node. The query: select n1.id from nodes n1, nodes n2 where n1.path like n2.path || '%' and n2.id = 14; QUERY PLAN