[thelist] [mysql] multiple update query
Raditha Dissanayake
jabber at raditha.com
Wed Mar 10 10:36:34 CST 2004
Hi
Kris, what ever you do updates are going to be slow - unless you drop
the indexes before the update and recreate them afterwards. This
dropping and recreating the index is a standard practice and highly
recommended in the mysql manual. In my own personal experience i have
found that the diffence in time take to complete the query with and
without indexes can be as much as an hour!!
btw Tab, It's the same thing (sql2k and mysql update)
Tab Alleman wrote:
>kris burford wrote:
>
>
>>>>is there a means i can do something like
>>>>update table set (foo='1' where id ='1'), (foo='2' where id='2');
>>>>
>>>>
>
>
>
>>can't believe that there's not a simpler method...
>>
>>
>
>Well I don't know about MySQL, but SQL2k supports this:
>
>UPDATE Table
>SET foo=id
>
>Is that what you want?
>
>
--
Raditha Dissanayake.
---------------------------------------------------------------
http://www.radinks.com/upload/
Drag and Drop Upload thousands of files and folders in a single
transfer. (HTTP or FTP)
More information about the thelist
mailing list