views:

35

answers:

3

I created an Innodb table with a id and name column and running this query

insert into test (name) VALUES('test');

takes .5 seconds

even

SELECT id FROM test LIMIT 1

or

select 1

takes .5 seconds or so

Any suggestions on where I can read more about how to improve the speed would be helpful. I would imagine these queries shouldn't take more than .05 seconds or so. Restarting the server and check/repair/analyze didn't help.

Is there such a thing as checking the base query time? i.e. the fastest a query can run? I wonder if it's the server being slow, the load averages doesn't say that it's being over utilized.

I am using mysql query browser to test these statements.

+1  A: 

SELECT 1 should have been nearly instant. I would suggest checking to see if something else is using up CPU cycles or something on your system.

webdestroya
+2  A: 

How far is your client away from the server (network-wise)? If "select 1" is taking 0.5 seconds, it might be that your round trip to the database server is about 0.5s.

Jonathan
I am surprised query time isn't reported separately from the latency time.
Christopher
A: 

Do you have access to shell on that server? Log into mysql from the command line locally and try a few commands from there.

Next probably want to look at latency, how far are you from this server if its remote?

kmfk