aquery

aquery - &4uery & )atabase 6ystem...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: &4uery & )atabase 6ystem for 2rder )ennis 6hasha-oint work with &lberto /erner lerner%csnyuedu shasha%csnyuedu 0otivation 7he need for ordered data 4ueries in inance 'iology and 1etwork 0anagement depend on order 64/ "" has extensions the 2/&3 amendment that incorporate order to the language but they are clumsy to use month moving average# the wrong way sale s avg mont h 6(/(7 tmonthtsales tsalestsalestsales 520 6ales t 6ales t 6ales t :+(5( tmonth tmonth &1) tmonth tmonth 5WTIQLRX $ -oin eliminates first two months )o we really need a threeway join$ an the optimizer make it lineartime$ month moving average# the hard way sale s avg mont h 6(/(7 tmonthtsales tsales &6( :+(1 tsales is null &1) tsales is null 7+(1 tsales :+(1 tsales is not null &1) tsales is null 7+(1 tsales tsalestsales (/6( tsales tsales (1) 520 6ales t /(7 287(5 -2,1 6ales t 21 tmonth tmonth /(7 287(5 -2,1 6ales t 21 tmonth tmonth 5WTIQLRX $ :riteonce query 7hree way join month moving average# the 2/&3 way sale s avg mont h 6(/(7 monthsales avgsales 29(5 25)(5 '> month 52:6 '(7:((1 35((),1* &1) 855(17 52: 520 6ales 5WTIQLRX $ 29(5 construct is confined to the 6(/(7 clause &wkward syntax 1etwork 0anagement 4uery ind duration and average length of packets of src dst flows & flow from src to dest ends after a minute silence YNR L KX Y s s s s s s XW J s s s s s s 5HJPL YX QL S ! :,7+ 3rec &6 srcdstlentimeptime 6(/(7 srcdstlentimemintime 29(5 w 520 3ackets :,1)2: w &6 3&57,7,21 '> srcdst 25)(5 '> time 52:6 '(7:((1 35((),1* &1) 35(((),1* low &6 srcdstlentimeflag 6(/(7 srcdstlentime &6( :+(1 timeptime 7+(1 (/6( 520 3rec low,) &6 srcdstlentimef,) 6(/(7 srcdstlentimesumflag 29(5 w 520 low :,1)2: w &6 25)(5 '> srcdst time 52:6 81'281)() 35((),1* 6(/(7 srcdstcountavglen 520 low,) *5283 '> srcdstf,) ,ntertuple operations require joins or additional query constructs or both 2rdering can only be obtained in specific clauses eg 6(/(7 'ottom line# 4ueries become difficult to read ost of execution is larger than necessary optimization of nested queries is still an open problem 2rder in 64/#"""...
View Full Document

Page1 / 7

aquery - &4uery & )atabase 6ystem...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online