Steve Jones, 2012:
"The more I think about my career, the more I think that I've spent more time fixing things than actually working on new code."
Maurice Wilkes, 1949:
"As soon as we started programming, we found to our surprise that it wasn't as easy to get programs right as we had thought. Debugging had to be discovered. I can remember the exact instant when I realized that a large part of my life from then on was going to be spent in finding mistakes in my own programs."
So, you're not the first to come to this realisation! 😉
I tend not to be involved too much in debugging SQL myself, but that's mainly because the developers of our main application work at a remote site and look after their own data. Most I've done has been to add some indexes to speed up commonly used queries.