No pictures, or something like that.
The queries are:
$sql= "UPDATE TBL SET param1=" . $_POST["param1"] . ", param2=" . $_POST["param2"] . ", param3=" . $_POST["param3"] . ",parma4=" . $_POST["param4"] . " WHERE F=" . $_POST["F"] . " and D=" . $_POST["id"] . " and M=" . $_POST["M"];
and the second is a simple insert to TBL.
It is inside a loop for up to 10 times.
A large mount of co-current queries
Moderator: General Moderators
Re: A large mount of co-current queries
That should not cause any problems.
How long does one update take when you use the timer code I posted before?
And you may want to think about escaping stuff btw.
How long does one update take when you use the timer code I posted before?
And you may want to think about escaping stuff btw.
Re: A large mount of co-current queries
If it's only one query at a time - it's 0.00002 seconds.
Re: A large mount of co-current queries
So where does it get slow?
Re: A large mount of co-current queries
It got slow because of the amount of queries made by the different clients.
The server couldn't handle those queries in real-time, and a queue of queries got bigger and bigger.
The server couldn't handle those queries in real-time, and a queue of queries got bigger and bigger.
Re: A large mount of co-current queries
Well that doesn't make sense; if each user is executing 10 queries, and the queries take 0.00002, then the script executes in 0.0002 seconds.
So unless every user executes the script within 0.0002 seconds of eachother, how can a queue be built up?
So unless every user executes the script within 0.0002 seconds of eachother, how can a queue be built up?
Re: A large mount of co-current queries
3 clients, each one of them causes 10 queries. Every second 30 queries.
Now, it seems that it is not linear. 10 queries don't last single_query_time*10. It's much more relatively.
Add to that math a <span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span> host and after 10 hours you've got that result apparently.
Now, it seems that it is not linear. 10 queries don't last single_query_time*10. It's much more relatively.
Add to that math a <span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span> host and after 10 hours you've got that result apparently.
Re: A large mount of co-current queries
how do you time the queries? make sure you run them with SQL_NO_CACHE to obtain relevant results. Also, run EXPLAIN on each and make sure they are hitting the indexes properly.
It might also help if you posted some code
It might also help if you posted some code
Re: A large mount of co-current queries
Today I tried something simple: I made a query directly via the cpanel on my web site:
SELECT * FROM TABLE WHERE 1;
It took 0.05 seconds (3000 rows). No other client was connected at that time, so my DB was absolutely in idle mode. I asked the support team of my hosts and they said that this result is fine.
It seems that they are not capable to deal with real-time databases at all. Is it consideredd OK or really slow?
SELECT * FROM TABLE WHERE 1;
It took 0.05 seconds (3000 rows). No other client was connected at that time, so my DB was absolutely in idle mode. I asked the support team of my hosts and they said that this result is fine.
It seems that they are not capable to deal with real-time databases at all. Is it consideredd OK or really slow?