0% found this document useful (0 votes)
2 views8 pages

HEUR

The document outlines a heuristic-based algebraic optimization algorithm for query processing, detailing steps such as breaking down SELECT operations, rearranging query tree nodes, and combining operations like CARTESIAN PRODUCT and JOIN. An example query is provided to illustrate the optimization process, focusing on retrieving employee last names based on specific conditions. The methodology emphasizes the use of commutativity and associativity to enhance query efficiency.

Uploaded by

Flora Mary
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views8 pages

HEUR

The document outlines a heuristic-based algebraic optimization algorithm for query processing, detailing steps such as breaking down SELECT operations, rearranging query tree nodes, and combining operations like CARTESIAN PRODUCT and JOIN. An example query is provided to illustrate the optimization process, focusing on retrieving employee last names based on specific conditions. The methodology emphasizes the use of commutativity and associativity to enhance query efficiency.

Uploaded by

Flora Mary
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Heuristic-Based Query

Optimization

1/9
Heuristic-Based Query Optimization
• Outline of heuristic algebraic optimization algorithm
1. Break up SELECT operations with conjunctive conditions
into a cascade of SELECT operations
2. Using the commutativity of SELECT with other operations,
move each SELECT operation as far down the query tree as
is permitted by the attributes involved in the select
condition
3. Using commutativity and associativity of binary
operations,
rearrange the leaf nodes of the tree
4. Combine a CARTESIAN PRODUCT operation
with a
subsequent SELECT operation in the tree into a JOIN
operation, if the condition represents a join condition
5. Using the cascading of PROJECT and the commuting
of
PROJECT with other operations, break down and
move
lists of projection attributes down the tree as far as possible
by creating new PROJECT operations as needed
6. Identify sub-trees that represent groups of operations that
can be executed by a single algorithm 2/9
Heuristic-Based Query Optimization:
Example

• Query
"Find the last names of employees born after
1957 who work on a project named ‘Aquarius’."

• SQL
SELECT LNAME
FROM EMPLOYEE, WORKS_ON, PROJECT
WHERE PNAME=‘Aquarius’ AND PNUMBER=PNO AND
ESSN=SSN AND BDATE.‘1957-12-31’;

3/9

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy