DiigIT | IT Community
No Profile Image
Welcome Guest
New User? Register | Login

Update query takes too long time!!

By: | 24 Jul 2009 11:50 am

Dear All,

An SQL query to update a field in a table takes too long time to run. Can anyone advise me to get rid of this. My SQL is simply like::

UPDATE tbl_member SET signin=`No` WHERE User_Id=20
OR
UPDATE tbl_member SET signin=`Yes` WHERE User_Id=20

There are only about 200 records in table but above query takes about a minute or more to complete.

My Server is: Ubuntu
MySQL : 5.0
Thanks

Comments

Anyone advise me to get rid of this. My SQL is simply like::

or more to complete.

That should run a lot faster with only 200 records so I would point my finger at the hardware or configuration settings.

How much hd space do you have free?
How much swapp space?
What kind of CPU do you use?
How much free RAM do you have?
What is the output of uptime (the load average stuff)?

I think if you answer the question above it should get us somewhere. I will ssh to my server later and get my MySQL config file. It made my server run quicker.

By: | 24 Jul 2009

Leave a comment

Enter the text in the image
img
Can't read?
Type the characters you see in the picture below.


Close Move