133 lines
2.0 KiB
Plaintext
133 lines
2.0 KiB
Plaintext
We use the LINEITEM relation from the TPC-H benchmark at scale factor 0.1
|
|
|
|
lORDERKEY : 1
|
|
lPARTKEY : 15519
|
|
lSUPPKEY : 785
|
|
lLINENUMBER : 1
|
|
lQUANTITY : 17
|
|
lEXTENDEDPRICE : 24386.67
|
|
lDISCOUNT : 0.04
|
|
lTAX : 0.02
|
|
lRETURNFLAG : N
|
|
lLINESTATUS : O
|
|
lSHIPDATE : 1996-03-13
|
|
lCOMMITDATE : 1996-02-12
|
|
lRECEIPTDATE : 1996-03-22
|
|
lSHIPINSTRUCT : DELIVER IN PERSON
|
|
lSHIPMODE : TRUCK
|
|
lCOMMENT : blithely regular ideas caj
|
|
|
|
|
|
query LINEITEM feedproject[lORDERKEY, lPARTKEY, lSUPPKEY, lLINENUMBER,
|
|
lQUANTITY, lEXTENDEDPRICE, lDISCOUNT, lTAX, lRETURNFLAG, lLINESTATUS,
|
|
lSHIPDATE] count
|
|
|
|
|
|
13.86, 13.66, 13.61 sec
|
|
|
|
Estimate 16.76
|
|
|
|
|
|
query LINEITEM feedproject[lORDERKEY] count
|
|
|
|
2.95, 2.96, 2.95
|
|
|
|
Estimate 5.95
|
|
|
|
|
|
Time difference is 13.66 - 2.96 = 10.7
|
|
|
|
Time per attribute is 10700 / (10 * 600572) ms = 0.0018
|
|
|
|
|
|
let LINEITEMFirstAttr = LINEITEM feedproject[lORDERKEY] consume
|
|
|
|
|
|
query LINEITEMFirstAttr feedproject[lORDERKEY] count
|
|
|
|
2.32, 2.32, 2.32
|
|
|
|
Estimate 2.39
|
|
|
|
|
|
let LINEITEM10 = LINEITEM feed ten feed product remove[no] consume
|
|
|
|
let LINEITEMFirstAttr10 = LINEITEMFirstAttr feed ten feed product
|
|
remove[no] consume
|
|
|
|
|
|
|
|
query LINEITEM10 feedproject[lORDERKEY] count
|
|
|
|
57.22, 60.26, 58.39
|
|
|
|
Estimate 59.5
|
|
|
|
Tuplesize is 169.8
|
|
|
|
|
|
query LINEITEMFirstAttr10 feedproject[lORDERKEY] count
|
|
|
|
25.70, 22.70, 22.88
|
|
|
|
Estimate is 23.9
|
|
|
|
Tuplesize is 5
|
|
|
|
|
|
Time difference is 58.5 - 22.8 = 35.7
|
|
|
|
Difference in number of bytes is 164.8 * 6005720
|
|
|
|
Time per byte is 35700 / (164.8 * 6005720) = 0.036 mikrosecs
|
|
= 0.000036 ms per byte
|
|
|
|
|
|
For this query:
|
|
|
|
query LINEITEMFirstAttr10 feedproject[lORDERKEY] count
|
|
|
|
total time for bytes is 6005720 * 0.000036 = 0.216 sec
|
|
|
|
total time for attrs is 6005720 * 1 * 0.0018 = 10.81 sec
|
|
|
|
Remaining time is 22.8 - 11 = 11.8 sec
|
|
|
|
is 11800 / 6005720 = 0.002 ms per tuple
|
|
|
|
|
|
|
|
|
|
Estimates for small relations are a bit too large because time
|
|
per byte is measured for reading large relations from disk (not buffered).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|