Anda di halaman 1dari 7

Materi VII: Distributed Query Processing Query Processing: High level user query Query Processor

low level data manipulation commands Komponen !omponen query processing: Query language Metodologi e!se!usi query "ptimasi query Proses sele!si alternati#: $ontoh: SELECT ENAME FROM EMP,ASG WHERE EMP.ENO = ASG.ENO AND DUR >37 Strategy 1:

%&'M% (

DUR > *+ EMP ) ENO =AS ) ENO

(%MP,'-.//

Strategy 2: 0 %&'M% (%MP Masalahnya1

Mana yang lebih bai! 1

ENO

( DUR>*+ ('-.///

-trategy 4: plan 5

-trategy 4: plan 4

Modul 2asis Data 3ersebar

Materi VII: Distributed Query Processing Pertimbangan biaya (cost/ 'sumsi: size(%MP/ 6 788 dan 9umlah re!ordnya 48: size('-./ 6 5888 dan 9umlah re!ordnya 48 tuple access cost 6 5 unit; tuple trans#er cost 6 58 units -trategi 4 plan 5: produce '-.<: (58=58/)tuple access cost 48 trans#er '-.< to the sites o# %MP: (58=58/)tuple trans#er cost 488 produce %MP<: (58=58/ )tuple access cost 4 78 trans#er %MP< to result site: (58=58/ )tuple trans#er cost 488 3otal cost 7>8 -trategi 4 plan 4: trans#er %MP to site ?:788 tuple trans#er cost 7:888 trans#er '-. to site ? :5888 tuple trans#er cost 58:888 produce '-.<:5888 tuple access cost 5:888 9oin %MP and '-.<:788 48 tuple access cost @:888 3otal cost 4*:888 Distributed Query Processing Methodology

-tep 5: Query Decomposition 'nalisa Contoh 1: SELECT %&'M%:A%-P FROM %MP: '-.: PA"B WHERE %MP)%&" 6 '-.)%&" AND '-.)P&" 6 PA"B)P&" AND P&'M% 6 C$'DD$'MC AND DEA 6 *> AND 3I3F% 6 CProgrammerC

Modul 2asis Data 3ersebar

Materi VII: Distributed Query Processing

Contoh 2: SELECT %&'M%:A%-P FROM %MP: '-.: PA"B WHERE %MP)%&" 6 '-.)%&" AND P&'M% 6 C$'DD$'MC AND DEA 6 *> AND 3I3F% 6 CProgrammerC

Penyederhanaan SELECT 3I3F% FROM %MP WHERE %MP)%&'M% 6 GB) DoeH OR (%MP)3I3F% 6 GProgrammerH/ AND NOT (%MP)3I3F% 6 GProgrammerH OR %MP)3I3F% 6 G%lect) %ng)H/ AND NOT (%MP)3I3F% 6 G%lect) %ng)H// SELECT 3I3F% FROM %MP WHERE %MP)%&'M% 6 GB) DoeH Aestru!turisasi 3rans#ormation Aules:

Modul 2asis Data 3ersebar

Materi VII: Distributed Query Processing

$ontoh Aestru!turisasi: Iind the names o# employees other than B) Doe who wor!ed on the $'DD$'M pro9ect #or either one or two years) SELECT %&'M% FROM PA"B: '-.: %MP WHERE '-.)%&"6%MP)%&" AND '-.)P&"6PA"B)P&" AND %&'M% J GB) DoeH AND PA"B)P&'M%6G$'DD$'MH AND (DEA654 OR DEA647/

Modul 2asis Data 3ersebar

Materi VII: Distributed Query Processing Hasil Aestru!turisasi:

-tep 4: Data localiKation (#ragment mana yang terlibat dan optimasi/

%liminasi pe!er9aan yang tida! perlu : Aedu!si untu! PHI

Modul 2asis Data 3ersebar

Materi VII: Distributed Query Processing %liminasi pe!er9aan yang tida! perlu : Aedu!si untu! VI

%liminasi pe!er9aan yang tida! perlu : Aedu!si untu! DHI

Modul 2asis Data 3ersebar

Materi VII: Distributed Query Processing

%liminasi pe!er9aan yang tida! perlu : Aedu!si untu! HI

Modul 2asis Data 3ersebar

Anda mungkin juga menyukai