Semantic information-based alternative plan generation for multiple query optimization

Download Semantic information-based alternative plan generation for multiple query optimization

Post on 02-Jul-2016

212 views

Category:

Documents

0 download

Embed Size (px)

TRANSCRIPT

  • !

    ! "# $%%%% &

    " # $%%%& ' ( $%%%& )% $%%)

    *

    +

    C40-. C40/01.2 /01

    3 4

    3 2

    3 2 1

    4 2 5 2

    + 4

    4 2 6 4

    3

    /012

    4 - 2 +

    4

    4

    2 $%%) * 52 2

    '() & & / &

    & &

    5 )'7 C40$%%). )%'8)''4442299

    ! 2 : (

    ; ( $>$2

    * ) ?222 C402 . ?222 C402 .

    ?22 C402 .2

    %%$%%$==9%)9@ $%%) * 52 255: % % $ % % $ = = C40 % ) . % % ) ) " )

  • 0

    A2

    2 / C40/01. A 4 C40 2. 4 2 5 3 B2C4 4 3 3 2

    3 4 D 3 2 3 2 C4 4 3

    3 2 +

    3 2 + /01

    3 2

    5

    B 4 2

  • 2 5 4 3

    A /012 + /01

    *3 )2)2

    C40 .2 - 4 4 2 + 2 + 2 2

    C40 3 .(C40 .*C40 .

    4 4 3 :

    ): 2$: H 2

    + $ 2 2 ) $4 4 D ) $2 *3 ) $ IIHH ( 2 + A 4 2 )

    dno=dno

    dname="Ceng"sex=female

    dno=dno

    status=repeat

    Student Department Student

    2 )2 ) $2

    , - . /01 C40$33/4 /305/00 )%=

  • 2 C4 2 $ IIHH 4 ( 2

    EFG 4 - $ ' 2 4 2 5 2 A2

    + /01

    A : + 4

    EF$'$"G2 + A 4:

    ; ) ) $ 4 2 2 /01

    )) $$ 2;

    ) 2

    + 2 4 2 *3 )2$ /01

    4 ' J 2

    sex=female status=repeat

    dno=dno

    dname="Ceng"

    DepartmentStudent

    2 $2 ) $2

    )%J , - . /01 C40$33/4 /305/00

  • C40 .2 - ' ) $ ' 4 2 + + )2

    )) ) $ ' )$ " =$) " J $$ 7 F K$' ' = ') $ "

    + 3

    3 :

    )) $) ') ) $ ' " J K%

    )) $$ ') ) $ ' " 7 F K ))=

    )) $' ') ) $ ' " = K=

    )$ $) ') $ " = J 7=

    )$ $$ ') $ " = 7 F K )%%

    )$ $' ') $ ' " = K%

    + 4

    2 ) $ ' )) $$ ') 4 "= "% "% )$ $) ')

    3 7=2

    + 42 4 $2 5 ' 4 4 - EFG2 5 " 4 - 3 4 /01 2 = 42

    + )

    +

    + ) $ ' " = J 7 F K

    = )% '% '% $% )= )= )% )=

    , - . /01 C40$33/4 /305/00 )%7

  • 0

    3 32 D 4 D 22 EJ7)$)')F$%$)$J$78$K')G2 C4 2 E'G 2 /01

    3 2 L (6 E)JG

    3 A 2 + 3 3

    2 M 2 E'$G

    2 +4 4

    4 A 2

    *3 )2$ A C40,"".E$$G 4 E$'$"G EKG 4 D 2 5 EFG

    2

    + E))G 2

    3 3

    3 2 +

    2 + E)G 1+-* E$=G2 5

    4

    2

    6 4

    4 A E$'G2 5 2 + D 4 3 2

    4 3

    E"=G2 5 4 2 1

    )%F , - . /01 C40$33/4 /305/00

  • 2

    3

    2

    5 E$'G 4 4 A

    2 + 4 H E"G2

    5 4 -2 5

    ( 7 7 EFG2 3 4 4

    3 2 4 3 4 - 4 - - 2

    0 / ( # 7

    5 4 4 D - EFG2 '2)2) 4 - '2)2$ -2 + 4 2 + 4

    '2)2'2

    0 / / ( 7+ 3 4 2

    4 2 8 /01 4 ) 2 + ) 8 2 5

    3 4 ) 2 + 4 3 '2

    C40! "#.20 : )$'5 : ) $ ' ) $ )

    $

    ) '

    )

    '

    , - . /01 C40$33/4 /305/00 )%K

  • $ '

    $

    '

    : )

    ) $

    $ '

    ' + 3 4 4 /01 2

    0 / $ 7+ 3 2 *

    3 4 3 2 4

    3 2 + 4 4 2 > - 4 4 -2

    4 8 A 4 : )$ )2 8 :

    $ )$ )2 6

    )% 4 $)% 4 C4022 .2 + "K'% 4 '% 2 C4 2 5 2 6 2

    0 / 0 ( 7 3 4 4 EFG2 +

    + $2 + 3 4 A A4 -2 4- - 2 + 4 - B

    3 2

    + $

    4 -

    >2

    >2

    94

    -9- /019/01 9

    )% = )2F= )27$ )

    )% )% )2') )2'$ )

    )% )= )2)J %2K= )

    )= )= )2'J $2= )

    $% )% '2$ )2FF )

    $% = )2"7 )2%$ )

    ))% , - . /01 C40$33/4 /305/00

  • C4 4

    D 4 D

    3

    /0126 /01 2 + 4 2 N D 4 4 2

    0 $

    2 + 2 N

    C40H. 4 $ 2 + 3 2 * 3 4 2

    A 2+

    2 3 4

    )% 4 =2 4 )%%%

    4 $% & 2

    C 4

    4 2 + D 2

    C40. 3 3 3 2 5 4 4 32 5 4 - 32 6

    4 4 2

    + 3 2 5

    4 $ 2+ D 2

    E)=G 4 2 +

    , - . /01 C40$33/4 /305/00 )))

  • A 4 2 6 $ A4 4 25 4 4 2 1 4 2 4 22 2

    0 & D

    4 2

    4 2 4 4 2 3 ) $= ) =%2 4 - & 4 2 + 2 4

    2

    N '2)2 N 4: )$' 2 2 #

    4 2 4

    2 6 2 + 2

    */ > E)%G 2 5 4 4 2 5 E$)7)KG2 5

    4 4 3 2 22 4 26 2 5 3 '2) 4 2 6

    2

    ))$ , - . /01 C40$33/4 /305/00

  • 2 2 2 2 '2) 4 D C409,. D C40+,. D C40,.2 9, 2 + 9 4 $ :

    + 9, : 2

    +, 2+ A 4 2 3 O :

    + +, # :

    ,

    + 2 +

    2

    4 D 2 5

    2 1 4 6 P E'%G 2 +

    2 2C4 4 2

    ! C40QQ$.2"# 2$#

    , - . /01 C40$33/4 /305/00 ))'

  • #

    $

    %$ $

    ! C40 . C40 . %%!$%$ !

    *3 '2$ 4 J " 3 2

    C40 .2 - 3 4 + '2 4 :

    ) "=)

    $ J)'=

    ' )J'"=

    " J')="

    1 D C40$. + "2 N 4 '2)2 + =

    + '

    5

    >2 #

    ) $F ' =J$ )%) )% >' 7' J J" "7 = == )FF ' )"J )"J )% ')

    ))" , - . /01 C40$33/4 /305/00

  • + "2 + + =2

    5 + =2 3 )' )"

    )"=2 + 2 C4 )' '=)= )" =%K' 22 )' )"2 + D ) " 4 ) ' 2

    0 0 ( 7 (

    6 '2) 2 5 A 2 C4 2 N 3 4 2 6 - 4 /014 2 +

    + "

    0

    >2

    >2

    >2

    )$ % $ =)' % ' K)" $ ' K$' % " )K$" % " )K'" % = $'

    + =

    9, +, ,

    )$ J"F ))$F % )' FF' $J'$ % )" FF' $J'$ )=7F $' $="J ='J$ % $" $="J ='J$ % '" $7F) JFJJ %

    , - . /01 C40$33/4 /305/00 ))=

  • 2 + 4 C40. : 4 2 2 ' 7 + J2 6 4 - 7 $) 2 2 5 4 $) $ "$ 4 2 C4 4 2 5 2 ' = 4 $) 2 + )% 4 2 0 2 3 ' 2 + 4 2 C ' ' ' /012

    5 4 2 + 4

    q3

    q4

    q1 q2

    q6

    q5 q7

    q2

    q6

    q1

    q7

    q2 q1Eliminate redundant

    query pairs

    q1 q5

    q4 q6

    grouped queriesQueries (initial plans)

    2 '2 2

    + J

    4 -

    0

    ) )

    )

    )

    $ $

    $

    ' >" "= =J J

    J

    7 7

    ))J , - . /01 C40$33/4 /305/00

  • 4 2 C

    3 4

    2

    5 A 4 2 ; 3 2 5 4 A 2 5 4 214

    2 '2$ 4 - 4 2

    ! C40&'"'"#''$'%.2"# 2$# 2QQ$C40 .QQ$C40 .QQ(Q$C40 .$ ) )

    $ )

    QQ ! $

    %! QQ ! QQ QQ

    %!%$%$!

    0 : 9 7 (

    5 D 4 -2

  • '2 A 4 2

    2 + 2 6 8 4 2 4 4 2

    5 4 2 5 2 '2' 2 J ' 2

    q3

    q1 q2

    q6

    q5 q7

    q2

    q6Eliminate redundant

    query groups

    Queries (initial plans)

    q4

    q2 q1q6

    q7

    q1

    q7

    q4

    q4 q3q6

    grouped queries

    q2q5q1

    q5q1

    q2

    2 "2 2

    q3

    q1 q2

    q6

    q5 q7

    Queries (initial plans)

    q4

    q5

    q4q7

    q6

    q3q2

    q1

    grouped queries

    2 =2 0 8 2

    ))F , - . /01 C40$33/4 /305/00

  • ! C40&''"#''$'%.2"# 2$# 2#

    QQ$C40 .QQ$C40 .QQ(Q$C40 .$ ) )

    $ )

    $ )

    !

    ! $

    %!

    %!

    %!!

    %!!

    %!%!

    %$%$%$!

    A '2' 4 2 +

    2+ 4 2 2

    , - . /01 C40$33/4 /305/00 ))K

  • 3 2 + 3

    ) 4:)2 )

    4 2$2 +

    4 $ 2'2

    2 3 -

    /01 3 2+ A 2 *3 4 4 4 -

    2+ "2

    %

    *3 3

    - 4 D

    4 3 2 + 4 :

    q4q2 q1

    q3q2 q4

    q1 q3 q4

    q1 q2 q4

    q1q2q3

    q1

    q4q1

    q4q2

    q3

    q1q2

    q4q3

    Query triples

    Eliminated query pairs

    q3

    q4 q3q1

    q4q2q1

    q2q4

    q3

    q2q1 q3

    Selected query pairs

    Eliminated query triples

    Selected query triples

    2 J2 - 2

    )$% , - . /01 C40$33/4 /305/00

  • /01 2

    /012 - 2 > 2+ C40 . 3 4 2

    9: > 2 $ 4 4

    2;: > 2+: 2 # = 32

    1 4 - 4 - - - 3 2 A2 +3 /012 + 4 H EFKG 2 + 4 2 + 3 /01

    2

    5 4 : /01 : /01 3

    4 D - 2 :

    2 : 4

    D - 2 - : 3 D -

    2 3 4 $%% //R

  • 4 7 )= $% = 7 )% )')= )7 $% 2

    )2 4

    2 + /01 4

    2

    + F

    + 7& 4 4 /01

    2 +

    4

    2 +

    4 - 4 4 32

    2 7 F 4 "% 4

    4 - 4 4 - )= $% 32 4 =) $% $% 2 C4

    + 7

    4 -

    >2

    >2

    >2

    4 - 9

    /01

    7 = = )2"7F %2FK)

    )= = = )2J'7 %2K$7

    $% = = )2$=K %2KFJ

    7 7 = )2=KF %2F'7

    )= 7 = )2F'F %2K==

    $% 7 = )2J$K %2KJ=

    7 )% = $2'JK %27')

    )= )% = $2KJ %2K)7

    $% )% = $2'J$ %2K"'

    7 )' = =2KKJ %27"%

    )= )' = "2JJ" %2FKJ

    $% )' = '2$'F %2K$J

    7 )= = '=2JJ %27J7

    )= )= = K2=$F %2FK=

    $% )= = 72=)) %2K='

    7 )7 = '%2= %2F)K

    )= )7 = $%2"% %2F7J

    $% )7 = K2='" %2FK'

    7 $% = $'2F %2F"

    )= $% = ")2== %2F7)

    $% $% = =%2=J$ %2FF7'

    )$$ , - . /01 C40$33/4 /305/00

  • 4 )$S 4 - 2

    +

    /01

    2 72 /01 4 - 4 -2

    + F

    /01 4 -

    /01 9

    7 )= $%

    = 0 )2"7F )2J'7 )2$=K

    7 0 )2=KF )2F'F )2J$K

    )% 0 $2'JK $2KJ $2'J$

    )' 0 =2KKJ "2JJ" '2$'F

    )= 0 '=2JJ K2=$F 72=))

    )7 0 '%2= $%2"%F K2='"

    $% 0 $'2F ")2==7 =%2=J$

    , - . /01 C40$33/4 /305/00 )$'

  • 2 2 + 4 3 C40

    . 2 C4 2 3 4 ' ) $ ' ) $ 3 4 ) ' 4 2 +

    A 2C4 4 ) 4 $ 4 $ 4 '2 4 ) $ 4 $ 4 4 ) '2

    + /01 4 - 4 -2 4 -2 2 K 4 - 3 4 7 )= $% 2 2 )% 4 4 - =%S

    4 -2

    : $ 7 7

    + -

    2 F2 4 - 4 -2

    )$" , - . /01 C40$33/4 /305/00

  • 4 2 5 3 ' 2 + 4 3 "%S 26 3 4 )

    )7

    - 2 +

    2 K2 - 4 - 4 -2

    2 )%2 4 - 4 -2

    , - . /01 C40$33/4 /305/00 )$=

  • FS C40 + K 2 )) )$.2

    + - 3 2 )' )" 2 + 3 - - 2

    + K

    -

    >2

    >2

    >2

    - 9

    /01

    )= = = )2=%JK %2K$7)

    $% = = )2$JK7 %2KFJK

    )= 7 = )2F7$' %2KJ))

    $% 7 = )2J)%) %2KJ='

    )= )% = $2KKF= %2K)F$

    $% )% = $2'J$) %2K"'7

    )= )' = "2F"KF %2K%%$

    $% )' = '2')7= %2K'%$

    )= )= = F2""K) %2K%$$

    $% )= = F2"K%= %2K=')

    )= )7 = =$2J'F %2FF)7

    $% )7 = K2KF %2FK""

    )= $% = F727'J %2FJFF

    $% $% = "F2%JF %2FFK'

    2 ))2 /01 - -2

    )$J , - . /01 C40$33/4 /305/00

  • : 0 9 ( 7 7

    *3 4 - 4 4 -

    2 )$2 - -2

    2 )'2 - - -2

    , - . /01 C40$33/4 /305/00 )$7

  • - 2 + )% 4 3 )2 N $% /013 4 - - C402 )= )J.2

    + )%

    4 -

    >2

    >2

    >2

    - 94

    /01

    7 = = %2KJJK )

    )= = = )2%"J= )

    $% = = )2%%%7 )

    )= 7 = )2%FF$ %2KK'K

    $% 7 = )2%=F= %2KKKF

    )= )% = )2)J=" %2KKFK

    $% )% = )2)%)K %2KK'=

    )= )' = )2'")) %2KK"=

    $% )' = )2)K)= %2KK$F

    )= )= = )27F"7 %2KK%"

    $% )= = )2"'$$ %2KKKJ

    )= )7 = )2F%K' %2KJ77

    $% )7 = )2'K'7 %2KK7)

    )= $% = $2=$%J %2KK'$

    $% $% = $2=7=J %2KKJ"

    2 )"2 - -2

    )$F , - . /01 C40$33/4 /305/00

  • 4 - - - C402 )7 )F.2 4 3 2 N 4 4

    2 )=2 /01 - 4 -2

    2 )J2 - 4 -2

    , - . /01 C40$33/4 /305/00 )$K

  • A B A

    4

    2 - 2 + 2 + 2

    2 )72 - - 4 -2

    2 )F2 - 4 -2

    )'% , - . /01 C40$33/4 /305/00

  • & '

    5 4 - /012 + /01 3 4 3 2 6 3 /012 A 2 + 2 + 4 2 6

    -2 5 4 2 0 2+ 3 2 *3 4 $ 4 3 -2

    6 A 2 3 4 $% $% /01 4 =% 2 5 4 )$S 2

    3 4

    /01 - 2 6 )= 3 )2F 4 7 2 + $2"4 )% "2J 4 )' K2= 4 )= $%2" )7 A ") $% 2 + 4 4 $ 4 /01 2

    -

    - 2 + "%S -2

    4 - 22 2 6

    4 26 4 2 E)"G - 2 5 4 3 2

    , - . /01 C40$33/4 /305/00 )')

  • E)G /2 : / +2

    ( )$ C40)K7J. K78)'72

    E$G (22 N (2 ; 2 /

    : 5*** 5 ( * )KFK 2 7J8F"2

    E'G 2 -2 ( ( )KF=2

    E"G 2 ( :

    4 : 5*** 5

    ( * )KK) 2 "F$8"K%2

    E=G 2 2 :

    5 P ; ( )KFF 2 $'%8$'K2

    EJG 2

  • E$=G /2 ;2 4 + 1+-* : /5-/1(

    5 / ( )KFJ 2 '"%8'==2

    E$JG /2 -2 / 2 L C

    P;(N # J C40'. C40)KK7. )K)8$%F2

    E$7G (2 /2+2 1 0 3

    5*** +2 L4 ( *2 7 C40$. C40)KK=.2

    E$FG 2>2 2 P

    4 : /5-/1( 5

    / ( )KKF 2 ')K8''%2

    E$KG 62 2+2 T 5*** +2

    L4 ( *2 J C40). C40)KK".2

    E'%G /2 6 #22 P N2 5

    : 5 ( * )KK7 2 )JK8

    )F%2

    E')G 2 T 2 1 :

    5 ( + )KKK 2 '"F8'J"2

    E'$G T2 M 2 :

    /5-/1( 5 / ( )KKF

    2 $7)8$F$2

    , - . /01 C40$33/4 /305/00 )''

Recommended

View more >