6

In doing some fairly small-scale data massaging/cleaning, involving JOINing a couple of tables, an early, erroneous attempt at a solution was drastically slower than (what I believe is) the correct one. I'm wondering if asking why the incorrect query was so slow would be on-topic here, or would it fall foul of the "too simple" rule (and should, instead, be asked on SO)?

I have read How do we define a question as being “too basic”? Where do we draw the line? and its answers. With respect to the first link of the first answer (leading to this answer) I am at best an "intermediate with aspirations" than a seasoned professional; but with respect to the the original question's second answer, while it isn't a particularly complex join, my question would not be about how to do the join, but why one version is so much slower than the correct one.

1 Answer 1

10

No, why a query is "too slow", compared to a different rewriting of the query, does not sound like a "too basic" question.

There may be various reasons for the performance difference, from the two being inequivalent (so the efficiency comparison is likely pointless) to being able to utilise different indexes or due to optimizer's restrictions or missing optimization features or plain complexity of the query, etc.

Certainly ask it here and not in SO.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .