So I wrote a SQL today. It was a rather big one, a few hundred rows big with sub-selects upon sub-selects.
Like I always do I checked the execution plan before running it.
I guess I missed a few joins because I got a rather big cost and some cartesian joins :)
A cost of 5,128,713,457 and the biggest table I queried only had 145 rows in it :)
Needless to say I fixed it and it runs just fine now with <10 in cost.
No comments:
Post a Comment