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
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
(published)
sq_ast_type_code btree (type_code)
sq_ast_updated btree (updated)
Any ideas?
--
Marc McIntyre
MySource Matrix Lead Developer
---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire