On Monday 24 July 2006 09:05, Ratheesh K J wrote:
> Hello All,
>
> I run a select query to see its speed. It took around 5 seconds. Now i run
> the same query simultaneously twice usng two instances of the client tool.
> It took 10 seconds for both the queris to complete. Its not 5 secs + 5
> secs. Both the queries were running till 10 secs when i saw using mytop. In
> the 11th sec both the queries ended. Running it thrice simultaneously, it
> took 15 secs for all the three queries to complete.

Consider this:

With the query cache enabled, running a query for the first time will take 5 
seconds.  Running it again immediately should be instantaneous, as the result 
set is in memory (and if it isn't, it should be in the OS disk cache 
[assuming a small result set]).

Two queries executed simultaneously will cause disk contention, because the 
query isn't cached by mysql, and the OS cache probably hasn't had time to 
commit the data coming from the disks either.

In the case of a single disk serving up the data, two simultaneous queries for 
the same data will cause the disk to go back and forth trying to satisfy each 
query.  Even with a mirrored pair of disks, you're going to have problems 
unless you have a very intelligent disk controller that can split the 
requests across the two disks.
-- 
Scanned by iCritical.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to