Re: Nested sets in SQL - inventor?
From: Marshall Spight <marshall.spight_at_gmail.com>
Date: 27 Jul 2005 22:36:51 -0700
Message-ID: <1122529011.244856.250850_at_g43g2000cwa.googlegroups.com>
> This is entirely wrong. Traversing adjacency list is fast. Each next
> node is found by index unique scan. Multiple invokations are not evil,
> as long as their calls are not exposed (over a network connection
> between client and server). This is why it makes sence supporting
> recursive SQL on server, instead of client querying hierarchy in
> multiple dynamically generated nonrecursive SQL queries.
Date: 27 Jul 2005 22:36:51 -0700
Message-ID: <1122529011.244856.250850_at_g43g2000cwa.googlegroups.com>
Mikito Harakiri wrote:
>
> This is entirely wrong. Traversing adjacency list is fast. Each next
> node is found by index unique scan. Multiple invokations are not evil,
> as long as their calls are not exposed (over a network connection
> between client and server). This is why it makes sence supporting
> recursive SQL on server, instead of client querying hierarchy in
> multiple dynamically generated nonrecursive SQL queries.
Isn't it the case that a recursive query that uses an index is roughly comparable to an indexed nested loop join? That is to say, it will perform quite well.
I completely agree with your conclusion. Client code executing multiple queries over the network is bad in so many ways.
Marshall Received on Thu Jul 28 2005 - 07:36:51 CEST
