|
|
|
|
|
by pedrow
1413 days ago
|
|
My SQL knowledge is very limited - I had heard of HAVING but not GROUP BY CUBE or COALESCE - but one thing stood out: "The rewritten sql ... ran in a few seconds compared to over half an hour for the original query."
I know there were four million rows in the dataset, but is 30 minutes the kind of run-time you would expect for a query like this? |
|
Clearly not since they got it down to a few seconds ;).
But tongue in cheek aside, it's incredibly dependent on what is in those 4M rows, how big they are, if they are indexed, whether you join in weird ways, whether the query planner does something unexpected.
SQL tooling is by and large pretty barbaric compared to most other tool these days, Intellij (and various spin off language specific IDE's) have the best tooling I've seen in that area but even then it's primitive.