Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 157 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

Yes, I know there are plenty of questions here by people complaining about the same kind of thing. What I want to know is why my question, which directly relates to programming/software-development and asks a real question, was closed as "off topic". The question is for my work, and I need to get help with it so that I can better do my job.

If what I posted about should not be posted on Stack Overflow, then please tell me where it should be posted.

The question is here: How can this complex query be simplified?

share|improve this question
I'm wondering why you seem surprised, given the question's first paragraph... Seriously though, chances are that some readers didn't get much past that paragraph and voted to close solely on that. – Mac May 1 '13 at 5:38
I was afraid someone would misunderstand that. My first paragraph was simply acknowledging the possibility that there might not be a single specific answer that's going to solve the problem, and that there might need to be a little back-and-forth to exchange details in order to come to a solution. None of that has anything to do with the question being off topic. – vertigoelectric May 1 '13 at 5:40
not constructive may be a better close reason, especially since there is no single specific answer .. – Krishnabhadra May 1 '13 at 5:43
@Krishnabhadra, how, then, do you suggest I make it "constructive"? It's a real scenario I need real help with. – vertigoelectric May 1 '13 at 5:44
@vertigoelectric I am not much of a database guy, but for starters 1) Remove the first paragraph, you don't need to advertise your question is not suitable for the site 2) Try and simplify the query yourself: even if you get any error post it here with your simplified query and error, so that users here will know what you have tried. – Krishnabhadra May 1 '13 at 5:56
Yeah, I'm surprised by the "off topic." It definitely seems more like a "not constructive" if anything, though I'm tempted to say that some of the people voting to close it might have thought it'd be more appropriate on Programmers. (Hard to say, though.) In any case, please do the first paragraph if you vote to reopen. – Kyle Strand May 1 '13 at 5:57
I guess most of us dont like to read 300 lines. – Anoop Vaidya May 1 '13 at 5:58
"The question is for my work, and I need to get help with it so that I can better do my job." Reads a bit like you think you deserve that your question be answered. We're all in the same boat (with real-life problems) but we should parse them down to something which is helpful for others who face similar problems, see Tim's answer. – hayd May 1 '13 at 10:47

Thank you for putting time into the question (seriously).

It might be a better fit for, as you need a large amount of code reviewed and it's not broken; you are just looking to improve it. It also looks like it could take a substantial amount of time to setup a test environment to give an accurate answer.

I think it would be fine for SO if you could narrow the problem down to a single problem/question, for example:

  1. "I profiled the query and noticed that the outer join between ABC and XYZ always causes an index scan. How can I optimize it to achieve an index seek instead?"
  2. "I tried to abstract this logic into a function to simplify the query and encountered ABC."

Right now it's very localized; someone else would have trouble gaining much benefit from it.

If the question was more like example #1, then a user looking to troubleshoot a slow outer join on indexed columns might find it useful. If it was structured like example #2, it might contain your specific code, but it would still be a useful reference for incorporating/troubleshooting a function in a MySQL query.


I'm a developer with a fair amount of database experience, so I don't think twice when I see a database-related question. But being objective, your question (or perhaps a more focused version) might be better suited to That may be the source of the "off-topic" verdict.

share|improve this answer
If the source of the "off topic" verdict was that the close voters believed it better suited to Database Administrators I wonder why they didn't migrate it. – Martin Smith May 1 '13 at 7:20
That's a fair question. I'd say it still needs some work (certainly remove the opening paragraph, and try to focus it somewhat) before being migrated. – Tim Medora May 1 '13 at 7:23
"It also looks like it could take a substantial amount of time to setup a test environment", yes, that's because the OP hasn't given anyone enough information in order to do so. It would be better if there was a small data-set in the question (or queries to generate one) that people could use in order to do so. This may also help significantly narrow down the cause of the problem if the OP can't then reproduce it. – ben is uǝq backwards May 1 '13 at 7:57
Thanks for all the tips. The problem was that I gave all of the information I knew to give and I already did everything I knew to do. I barely learned how to do profiling in SQLYog yesterday and even when I did it didn't give me any real helpful information. A while after posting I noticed the Code Review site, and wondered if it "may" have been better posted there, but I didn't just want a review. I wanted a solution. I also considered posting on a forum somewhere first but I wasn't sure where I would get the most prompt and helpful feedback. I'm doing my best... – vertigoelectric May 1 '13 at 15:42

In general people vote to close questions they don't like.

And nobody likes to read a paragraph like:

I realize this issue may not be exactly the type of thing for Stack Overflow, as it has potential of becoming more a discussion than a question-answer post, but I don't know another place where I can get the quality help and feedback I'm accustomed to experiencing here. I hope we can make an exception. I put a lot of work into this post...

Your question could be improved with a title like "Optimize query over media database". It would help if you removed the meta-talk about possibly being off-topic.

With those changes I'd hope your question would not be closed.

share|improve this answer
The thing with my opening paragraph has nothing to do with being 'off topic', though. It simply acknowledges that there may be the need for some back and forth discussion before coming to a workable solution, due to the likely possibility that someone attempting to answer may need more details. SE sites focus on questions that have definite answers, and while I know my question should have an answer, it may take a bit before coming to it. I simply didn't want to be ignorant of that. – vertigoelectric May 1 '13 at 15:44

You must log in to answer this question.

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