Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Databases Query Optimization question

  • 27-07-2006 4:01am
    #1
    Registered Users, Registered Users 2 Posts: 1,559 ✭✭✭


    Join query- theory query optimisation q


    Got a query optimisation q

    a relation r(a,b,c) is to be joined to relations S(B,c,d).
    The inclusion dependancies R.B subset S.B and
    S.c subset R.C
    hold.
    let IB(in S) = 70 ,
    Ic (in R) = 50
    let R have 7500 tuples packed on 600 blocks
    and
    S have 1000 tuples packed on 100 blocks .
    let m =101.

    What is the output size U of the join R (2 triangles with points facing each other symbol ) S?
    What is the Image size?
    What are the dominant factors for join and cross product - why are they different?

    What happens if s increases as follows Bs = 300 , Ts = 3000?

    Ok thats the Q I got.
    I think I figured out how to get the output size not sure if Im right though.
    From the details above I got
    Ib=70
    Ic=50
    R=7500 tuples in 600 blocks
    S= 1000 tuples in 1000 blocks
    M=101

    output size=(BrTs+BsTr) / Ib Ic
    = 600*1000+ 1000 *7500/ 70*50
    =600000+ 7500000/ 3500
    =8100000/3500=
    2314 Blocks

    So how do I calculate the image size and what are the dominant factors?


Comments

  • Registered Users, Registered Users 2 Posts: 995 ✭✭✭cousin_borat


    Are you studying for your repeat exams?


  • Registered Users, Registered Users 2 Posts: 1,466 ✭✭✭Smoggy


    Thats such a none real world question , I have designed enough large scale database as have never done a single calculation like that !.

    edit : I have just re read it , this line is a stunner :

    What is the output size U of the join R (2 triangles with points facing each other symbol ) S?

    :D:D


  • Registered Users, Registered Users 2 Posts: 1,559 ✭✭✭quinnd6


    yeah I dont know what that symbol is called so I just described what it looks like.


Advertisement