Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
300 views

SDD 1 Algorithm

The SDD-1 algorithm is a non-commercial system for distributed database query optimization that uses hill climbing. It aims to minimize the total time or response time of a query by initially calculating the cost of moving all relations to a single site, and then iteratively splitting and moving relations between sites until no further cost improvements can be found. An example is provided to illustrate calculating the costs of performing a multi-relation join query at different sites to determine the initial best query execution plan.

Uploaded by

Premdeep Parasa
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
300 views

SDD 1 Algorithm

The SDD-1 algorithm is a non-commercial system for distributed database query optimization that uses hill climbing. It aims to minimize the total time or response time of a query by initially calculating the cost of moving all relations to a single site, and then iteratively splitting and moving relations between sites until no further cost improvements can be found. An example is provided to illustrate calculating the costs of performing a multi-relation join query at different sites to determine the initial best query execution plan.

Uploaded by

Premdeep Parasa
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 14

PARASA PREMDEEP

08BCE213

SDD-1 ALGORITHM
System for Distributed Databases A non-commercial database Based on the Hill Climbing Algorithm No semijoins, No replication, No fragmentation.

SDD-1 ALGORITHM
Cost of transferring the result to the user site from the final result site is not considered Can minimize either total time or response time Input include Query Graph Locations of relations Relations statistics.

STEPS
1- Do the initial local processing

2- Select the initial best plan (ES 0) Calculate cost of moving all relations to a single site Plan with the least cost is ES0

3- Split ES0 into ES1 and ES2 ES1: Sending one of the relation to other site, relations joined there ES2:Sending the result back to site in ES0.

4- Replace ES0 with ES1 and ES2 when we should have cost(ES1) + cost(local join) + cost (ES2) < cost (ES0) 5- Recursively apply step 3 and 4 on ES1 and ES2, until no improvement

EXAMPLE
Find the salaries of engineers working on CAD/CAM project Involves EMP, PAY, PROJ and ASG sal(PAY title(EMP eNo(ASG pNo(pName = CAD/CAM (PROJ)))))

RELATION

EMP PAY PROJ ASG

SIZE

8 4 1 10

SITE

1 2 3 4

Assume Tmsg = 0 and TTR = 1 Length of a tuple is 1 So size(R) = card(R)

Cont..
Considering only transfers costs

Site 1
PAY site 1 =4 PROJ site 1 = 1 ASG site 1 = 10 Total = 15

Cont..
Site 2
EMP site 2 = 8 PROJ site 2 = 1 ASG site 2 = 10 Total = 19

Cont..
Site 3
EMP site 3 = 8 PAY site 3 =4 ASG site 3 = 10 Total = 22

Cont..
Site 4
EMP site 4 = 8 PAY site 4 =4 PROJ site 4 =1 Total = 13

Cont..
Cost for site 2 = 19 Cost for site 3 = 22 Cost for site 4 = 13 So site 4 is our ES0 Move all relations to site 4.

THANK YOU

You might also like