|
Posted by Hugo Kornelis on 05/28/05 00:50
On Fri, 27 May 2005 20:56:15 +0000 (UTC), Erland Sommarskog wrote:
> SELECT * FROM tbl
>
>with a UDF call for tree-traversal for each row is likely to perform
>poorly.
>
>So my vote goes for the column.
Hi Erland,
I agree that it's a trade-off. And there is no general "correct" answer,
that depends on the individual situation. How often is the depth
queried? How often does the tree change? Are these changes only
additions and deletions at the leaf level, or are other changes possible
as well?
>> it will work fone, even for multi-row inserts, as long as you never
>> insert both a parent and a child in the same statement
>
>Hey, the primary key is an IDENTITY column, so he can't do that!
Ah, you're right - I had missed that.
So that would be the next thing to fix: define and declare the natural
key. :)
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)
[Back to original message]
|