MySQL Forums
Forum List  »  Perl

Re: query execution becomes slow after the first execution of the program
Posted by: Rick James
Date: July 31, 2010 12:09PM

Please provide
* SHOW CREATE TABLE tbl\G -- engine, indexes
* SHOW TABLE STATUS LIKE 'tbl'\G -- sizes
* SHOW VARIABLES LIKE '%buffer%'; -- cache size <-- I suspect the answer is here
and surround them with [ code ] and [ / code ]

Also, consider "batching" the inserts. It is messy in PHP (can't use <?>s), but much faster to execute:
INSERT INTO xx (a,b,c) VALUES (1,2,3), (4,5,6), ...

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.