This is kind of a weird question but...
If I run this query in MySQL:
SELECT something FROM table WHERE id IN ();
which is obviously invalid, do I get some kind of time penalty (exception throwing, logging, something), compared to throwing a valid query?
The reason I'm asking is because I just found out an app I'm maintaining (not written by me) was throwing that particular query dozens of times per second to the DB, and I'm wondering whether fixing that might help with some weird performance problems we have on that same server.
My reasoning being based on "exceptions" being "slow" in a regular language, although I perfectly understand that there is absolutely no parallel here and that hasn't got anything to do with anything. Buy maybe there's some logging involved, or something that makes it slower?
Any ideas?
UPDATE: I should've specified this. I did fix this as soon as I found it. But we're having some weird performance problems in the server, and I wanted to see whether I could expect this to help considerably. Saving 15 regular queries per second to a server with this load is definitely not a big help (although i'm still doing it anyway). However, if an invalid query has to do something that takes time, then maybe....
Thanks! Daniel