Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Query #2 - MySQL and MS-SQL
Message
From
29/02/2008 19:02:55
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
29/02/2008 01:41:31
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01296743
Message ID:
01297924
Views:
28
>But you're right, as for everything you have to know its context of application. There might be applications, esspecially in datawarehousing where this is a very good solution as it performs much better than the recursive CTE but is much worse on updates and inserts.

I've had several situations where the degree of variability (or rather, the frequency of updates) varied, but this approach still yielded a substantial speed increase - and actually wasn't too slow to update from scratch as long as there was a neat index on parent key (and the same code would run for any update, but starting off the updated record's parent, not top parent). The simple nested seek/scan while was usually about 20 times faster than recursive SQL on parent key. Didn't try this on SQL, that it was already there where I needed it, already optimized, and I didn't even need to change the oil ;).

>Personally I've got some installation where I store a key path into a text field and can query unpon that, but yes, that also has its downside that the hierarchy has to be static or you have to use update triggers to update it.

And these update triggers aren't that hard to do.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform