dbTalk Databases Forums  

Re: is DB2 recursive query semantics inflationary?

comp.databases.theory comp.databases.theory


Discuss Re: is DB2 recursive query semantics inflationary? in the comp.databases.theory forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Joseph,,,
 
Posts: n/a

Default Re: is DB2 recursive query semantics inflationary? - 10-08-2003 , 05:33 PM






mikharakiri (AT) yahoo (DOT) com (Mikito Harakiri) writes:

Quote:
That's right: recursive view means that given temporary table state
T(N) at the step N we calculate T(N+1)

which means that temporary table is totally rewritten at each step
rather than incrementally inflated as Graeme suggests.

Am I missing some kind of optimization that reduces my execution to
Graeme's? (My guess would be that not every kind of recursive union
view would allow such transformation.)
First, you are confusing the language semantics with the evaluation
procedure. The semantics of the recursive view is the view instance
corresponding to T(n) where n is the least positive integer for which
T(n) = T(n+1). This is called the least fixed point of the query.

At step N you calculate T(N+1). If you compute T(N+1) from scratch,
it is called naive evaluation. For some queries, including all linear
recursive queries, you can do semi-naive evaluation which incorporates
the optimization of just computing the delta between T(N) and T(N+1) and
adding that into the temporary table for T(N) to get T(N+1).

Hope that helps.

Joseph


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.