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>


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'm still trying to wrap my head around recursive queries; they are a fairly new thing to think about, and I don't have a good model for how they are implemented. The 'recursive with' mentioned recently makes me think it's going to build the whole recursively defined set in advance of the select, but I expect that's probably not right.

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

Original text of this message