r/ComputerEngineering • • 6d ago

How much hours did you pay attention for learning Query Optimization in SQL/DBMS?

Post image

After 10 hours of decent focus studies, I am still wondering what the hell is this. I know the tidbits but yet not cracking the code. For example:

When the author says the heuristic is do selecitons and projections first. I understand that.

But when the author says some complicated stuffs:

Use associativity of binary operations to rearrange leaf nodes so that leaf nodes wit the most restrictive selection operations are executed first.

I completely lost the plot here.

7 Upvotes

3 comments sorted by

4

u/s1ickyR1cky 5d ago

Reading this was like walking on lego

2

u/ShadowSlayer1441 5d ago

The author is saying you can do the binary operation in arbitrary order, therefore you should do whatever reduces the intermediate output the most, which will in turn make the subsequent operations faster.

1

u/LiteratureHungry850 5d ago

not really relevant to this sub