on 2011 Oct 25 12:41 PM
What my BOFHs observe daily:
Given the extremeness of the situation (100% CPU usage), I am hoping that someone may fill me in on what we could be doing that could possibly cause this situation. We have not been able to reproduce this yet nor have we discovered any infinite loops in our code. Any pointers are welcome.
I am basically a n00b when it comes to SQL Anywhere, so I have to read up on application profiling I guess.
Request clarification before answering.
I had to defer the troubleshooting to my colleague, as I was otherwise engaged.
Eventually he found a query that would run all CPUs flat out and never finish. He waited for 15 minutes before killing it.
Then he looked at the query plan. In his words "it was messy".
The solution was to add an index to one of the temporary tables used. That whacked the query execution plan back into shape and we are back in business. The query now takes 20 seconds to run.
Not sure this deserves to be marked as 'an answer', but my colleague's workaround will hopefully see us through.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yeah, indexes are nice and all, but the code in question ran just fine with SQL Anywhere 10. We think we tripped over a bug introduced with later versions of SQL Anywhere. Even if a lack of an index (for a temporary table mind you) triggers a table scan, one would assume the query would finish eventually. To go flat out on all 24 CPU cores for a long time (on one occasion they waited for more than an hour before killing it) does not seem right to me.
User | Count |
---|---|
61 | |
8 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.