Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

All Mysql Updates are slow

Status
Not open for further replies.

wolfpac3d

MIS
Mar 14, 2003
1
US
update agents set lockout = 'Unlocked' where code = 'admin'

The above line of syntax is a normal syntax for me. It is a very simple syntax, but for some reason it takes anywhere from 4-7 seconds to update. This causes a problem on my website and applications. This table only contains 223,000 records. That is the deal can anyone help me. Below is the table description.


+-----------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------------+--------------+------+-----+---------+-------+
| CODE | varchar(255) | YES | | NULL | |
| FIRST_NAME | varchar(255) | YES | | NULL | |
| MIDDLE | varchar(255) | YES | | NULL | |
| LAST_NAME | varchar(255) | YES | | NULL | |
| PHONE_1 | varchar(255) | YES | | NULL | |
| PHONE_2 | varchar(255) | YES | | NULL | |
| PHONE_3 | varchar(255) | YES | | NULL | |
| STREET | varchar(255) | YES | | NULL | |
| Street2 | varchar(255) | YES | | NULL | |
| CITY | varchar(255) | YES | | NULL | |
| STATE | varchar(255) | YES | | NULL | |
| ZIP_CODE | varchar(255) | YES | | NULL | |
| COMPANY | varchar(255) | YES | | NULL | |
| LICNO | varchar(255) | YES | | NULL | |
| PROFESSION | varchar(255) | YES | | NULL | |
| EMAIL_ADDRESS | varchar(255) | YES | | NULL | |
| WEBSITE | varchar(255) | YES | | NULL | |
| COUNTY | varchar(255) | YES | | NULL | |
| Field16 | varchar(255) | YES | | NULL | |
| Field23 | varchar(255) | YES | | NULL | |
| Field24 | varchar(255) | YES | | NULL | |
| PHONE_TYPE_1 | varchar(255) | YES | | NULL | |
| PHONE_TYPE_2 | varchar(255) | YES | | NULL | |
| PHONE_TYPE_3 | varchar(255) | YES | | NULL | |
| Password | varchar(255) | YES | | NULL | |
| LAST_Amount | double | YES | | NULL | |
| Last_date_payed | datetime | YES | | NULL | |
| Lock | tinyint(1) | | | 0 | |
| lockout | varchar(20) | | | | |
+-----------------+--------------+------+-----+---------+-------+


 
Hi wolfpac3D,

it looks like you have imported a table from Access.

Your table does not have a primary key defined and all fields are not set to the right datatype. I think that you have to re-design and optimize it (create related tables, indexes, keys, etc) and then your updates will be much faster.

Bye

Qatqat The reason why my girlfriend can read my thoughts is because mine are properly written! (G.Lepore)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top