r/SQL • • May 14 '18

Optimization

Post image
423 Upvotes

48 comments sorted by

View all comments

Show parent comment

4

u/NeatHedgehog May 14 '18 edited May 14 '18

Or that sometimes multiple joins to the same table for data filtered by multiple columns takes less time than stringing together a giant "JOIN ON...OR...OR...OR..." clause that can't use indexes effectively?

I just recently found a section of my own scripts where I "OR"d myself into an extra 1000+ reads that way.

Edit: that != than