-19

I have tried to answer on questions considering data in huge amount and in the production phase. But most of the time these are not marked as accepted. Should I have to change my coding style?

7
  • 7
    Accepting an answer should not mean anything. Historically, some very poor answers have been accepted.
    – VLAZ
    Feb 25, 2022 at 11:43
  • 1
    Welcome to Stack Overflow. Voting, and accepting aren't mandatory; nor should they be. As someone that contributes solely to [sql-server] and it's related tags I can assure you that this isn't unexpected at all. I can some days contribute 10+ answers and net maybe 1 or 2 upvotes at most; other days just 1 answer and get 10+ upvotes. I don't doubt it's the same in other tags. If you want to make sure your answer is the one that gets votes, make sure it stands out and above the quality of the other answers as that gives it the best chance.
    – Thom A
    Feb 25, 2022 at 12:02
  • Asnwer1 is incredible slow, answer 2 and 3 are the same. the questions seems also to bee dupes
    – nbk
    Feb 25, 2022 at 12:25
  • 2
    It's the nature of the tag I would say. People with SQL problems need help quick, so quick in fact that they may not even come back at all which seems to be the case of your second link. Your window of opportunity will be really small and you're not going to see much love of other people either since SQL questions are usually very personalised. They're going to be asking their own variation on a variation of the same SQL question rather than find your answer.
    – Gimby
    Feb 25, 2022 at 16:26
  • What solves the problem today may not solve the problem tomorrow. And let's be honest: For a lot of questions there is not tomorrow. It's a one-and-done, hand it in job. Feb 25, 2022 at 18:07
  • It is not bad at all in general, but correct spelling wouldn't go amiss. Feb 26, 2022 at 22:53
  • Those questions should be closed as duplicates (& lack of MRE), not answered. Also prose in answers that just repeats what the code says is not helpful & exempifies bad code commenting.
    – philipxy
    Feb 27, 2022 at 3:43

2 Answers 2

12

Accepting an answer is not mandatory and can take 6 to 8 weeks.

You can always keep an eye on your posts and consider if improvements can be made.

In some cases I see you offered SQL code.

  • Why not provide a SQL Fiddle as well?
  • Why not offer links to the official documentation for the statements / function you use in your SQL?
  • Why not explain thoroughly what the SQL does?
  • Why not provide example output?
  • Why not show and explain an execution plan?

Only answers that are useful will get up-votes.
Only answers that that helped the OP the most get accepted, if you're lucky.
Only provide answers to questions that are not asked before. Instead flag such questions as a duplicate. That is much more valuable as all knowledge is then concentrated on one question, not spread across several.

To quickly find answers that got accepted in the tag use this search: https://stackoverflow.com/search?q=%5Bmysql%5D+isaccepted%3A1

Prior results are no guarantee for the future but going over some well received and accepted answers will give you an idea what an answer on Stack Overflow should look like.

1
  • almost all answers with over 20 votes are old, very old, today you wil noz get those kind of upvotes. correct5 is, that you 30% - 50% of answers get an upvote or are accepted, that is because the newbies don't know stackoverflow.com/help/someone-answers and we had a lot of discusiions how to bring new members to follow the rules
    – nbk
    Feb 25, 2022 at 13:32
2

Maybe the OP only had hundreds of data (rather than millions), or they didn't realize that it didn't scale well. The only thing that accepting an answer means is that the OP believes that it resolved the problem they were asking about. If performance or scaling well was not a requirement of their question, they're not obligated to consider it.

If you believe that that makes the answer less useful, you're perfectly free to downvote it (once you have enough reputation to do so) or comment explaining what you think the problem is. In fact, that kind of thing is encouraged because it helps the OP (and future readers) learn.

Also, if you're writing a query in a specific way to improve the performance or scalability, I'd encourage you to mention that fact in the answer. The answers you link to don't really explain why you think that the code will scale better than alternative ways of doing the same thing; it would be helpful if you pointed out what you did to optimize performance and explain why it does that. That way the OP (and future readers) can learn.

You must log in to answer this question.

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