I suspect this can be simplified. Thought people might find it amusing.
Andre Guirard | 10 November 2011 08:09:35 AM ET | | Comments (3)
But size alone is not a measure of a bad query. I once fixed a huge performance problem by changing a relatively small query to a larger one with a couple of UNION statements. Mine still easily fit on a single page, even if double space though.
I've seen a very rational SQL query that was about that long. It was actually a series of separate queries joined together. The query took about 4 hour to run against a 1/2 million row data set and generated a massive csv output file. Man I hated that thing...