Temat: Jak optymalizować zapytania SQL?
Zauważyłem ostatnio że JOINując po więcej niż jednym indeksie koszt zapytania wzrasta o około 1/4... Ważne też żeby wiedziec gdzie i czego szukać ;)
Zanalzłem kiedyś coś takiego:
Cost Range
Worry Time
Description
<100
Nearly instantanious
You know what you want and where to find it
100 - 1000
10s of seconds
You know what you want but its not quite so simple
1,000-10,000
A couple of Minutes
You're OK but you're having to work to find your information
10,000 - 100,00
10s of Minutes
YYou either have a really big job or you're unsure the best way to
find the information, have a think about it.
100,000 - 1,000,000
Upto an Hour
WHY ARE RUNNING THIS? SURELY IT CAN BE WRITEN BETTER? IS THIS JOB
REALLY THIS HUGE?
1,000,000 - 1,000,000,000
Hours
THE DBAs ARE LOOKING FOR YOU, BETTER HAVE A VERY GOOD JUSTIFICATION
READY
1,000,000,000+
Never
TURN IT OFF, TURN IT OFF NOW, WHY ISN"T IT OFF YET!
Łukasz Schabek edytował(a) ten post dnia 29.08.06 o godzinie 10:55