PDA

View Full Version : Volume limit on the use of mysql


ToltecXanander
7-4-03, 06:34 AM
When I signed up for this service I read something about a limit on the use of mysql (36000 questions per hour). I would like to have control on whether I am approaching this limit or not, so does anyone know if there exist a possible for viewing the number of questions one sends to the mysql server (something along the lines of the graphical view in the ops center)? Or are there any logs that I can analyze (via a php script I could write)?

Thanks a lot!

Pig
7-4-03, 01:50 PM
There is no such thing, however you have 2 options that can help you.

Rotate your users. you get 36,000/user/hour. If you rotate all 3 users, you get more queries. Look around in these forums for the answer.

You can manually track the query volume by making a small change to your scripts. The only queries that use up your quota are SELECTs. I use (and I believe most others do as well) a custom script when doing their queries that returns helpful debugging info if the query fails. You can add a line to insert a new row into a table, along with the time it occured and the page it occured on. This will tell you exactly where and when you are getting most of your queries. You don't get penalized for it's usage since it is an INSERT query, not a SELECT.

If you aren't currently using an alternage to mysql_query() then you could always make one for this purpose.

ToltecXanander
7-5-03, 04:53 AM
Thank you very much for your reply! This is a good suggestion. I have written a small class that takes care of all the interaction with the db, so adding a few lines of code to insert an extra row in another table isn't much of a hassle.

Why do PowWeb differentiate between inserts and selects, by the way? ...do they bother because the latter can be a lot more demanding on the server?