Reputation: 1141
I have an sql file with 90000 update queries
UPDATE xxxx SET price='x.xx', wholesale_price='y.yy' WHERE reference='azerty';
I try to update my database with :
mysql -u user -ppassword ecommerce < update_prices-1360224708.sql
But after 2 hours and half... my update is not finished... and with my bad luck, my internet cut during my SSH session and i'm sure the update fails.
So... I decide to cut my fail on 10 files (10000 lines per file, weight = 1MO) ... but with phpmyadmin, too many requests...
How long does it take to 90,000 requests?
Do I fail something ? When I use "one line"... it works, i'm sure there is no error on the file.
Someone has an idea ?
Upvotes: 0
Views: 72
Reputation: 1682
create an index on reference:
CREATE INDEX ix_reference ON tablename (reference);
Upvotes: 2