I have a myisam table with 2 columns. The primary key is the first column and is unique. I have php setup to insert new data into them. If it fails because the key is already there then it will do a select to grab the contents of the second column for that key. Then it will add the new data to the old and update the second column. I usually do around 3.5 million entries per update and it takes around 2-3 hours for it to do it. I was wondering if I like the table with write first then have it do it if it would be faster. Wasn't sure if you could do an insert, select, and update all in lock write or not. I figured it would keep the server from locking the table on each query and save some speed.
Also if I lock the tables before the update will it also update the keys. Meaning it will still find the duplicate keys right if they are new ones. I tried it on a dev table and it seems to help keep the flow stable instead of the amount of queries bouncing all over the place.
ok I am going to give that a try. What does concat do? I tried searching at mysql and couldn't get a real good answer. I am still new to mysql. I did the lock tables and it has made the update run 6 times faster. Hopefully with this it will make it even faster.