Home > Archive > MySQL ODBC Connector > April 2006 > Re: better way of doing 1800 sequential updates?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: better way of doing 1800 sequential updates?
Gabriel PREDA

2006-04-04, 3:27 am

------ =_Part_32015_1127154
1.1144137502630
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Because you have no indexes on that table... MySQL will open and search
within the entire table.

If you would have had an index MySQL would know how to go directly to the
row you want to update.

You are always looking for rows with:
WHERE id =3D"?????"
So there you have... you must add an index on the column named "id" !
Run in MySQL client:
ALTER TABLE ultimas_respuestas_s
nmp ADD INDEX someNameForTheInde4x
(id);

It will take a while... but it will get you faster.

--
Gabriel PREDA
Senior Web Developer

------ =_Part_32015_1127154
1.1144137502630--
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com