I am doing batch insert for inserting 80k records and 1200 records per batch. The query is executing fine. The problem is that I am getting data from mssql server and creating a batch array out of it. So there are changes are due to some reason one of the batch insert fails.
But when a batch insert fails, it does for all 1200 records of that particular batch.
So, is there any way to find out how to get the exact records from the batch of 1200 records that failed the batch insertion.
And one more question.
While doing these insertion, the web site goes down for the time of updation.
Is there any way that during this time as well the site is not down.
Any help will be appreciated.
Thanks
No tools will give you more performance, as your bottleneck is your server... what you can do to lower the server load is either to use transactions, or use "insert delayed".
Transaction: [ http://dev.mysql.com/doc/refman/4.1/...-commands.html ] If your db support it (mysql may need a specific backend to support it, depending of mysql version), you start a transaction by sending "start tansaction", then send all your insert one after the other, and finish the transaction with a "commit" or a "rollback". This method have the great advantage that the db knows that it don't have to re-compute the indexes before you do the commit.
insert delayed: [ http://dev.mysql.com/doc/refman/4.1/...t-delayed.html ] This is a special mysql command, that let you give a hint on the db about the importance of the insert. An insert delayed will always be processed when the db will not be occupied doing something else, it have a low priority comparing to standard insert/update.