Re: Bulk Upload.
Hello All, I have a strange situation while doing Bulk upload (using LOAD DATA FILE). I have a database which has 60 records, when I try to insert 1 more records it is taking around 50-55 seconds to complete the task (I feel this is much higher than the normal timings). I notice a strange thing that time taken to upload 1 records reduces to 10 to 12 sec after I run a big query (a query that needs full table scan) on that table. Can someone explain why this happens... I run MySQL 4.1.5 Gamma, on windows 2003 Server OS. Regards, Ramesh Confidentiality Notice: This transmittal is a confidential communication. If you are not the intended recipient, you are hereby notified that you have received this transmittal in error and that any review, dissemination, distribution or copying of this transmittal is strictly prohibited. If you have received this communication in error, please notify this office immediately by reply and immediately delete this message and all of its attachments, if any.
Re: Read past Equivalent in MySQL
Hi Mathias, Thanks a lot for your comments. In MS SQL we have something which can achieve this very simply: select Top 1 * from Table1 with (updlock,readpast) I am looking for something exactly similar to this in MySQL. Creating temp tables will not work for me as the no of users for the system could be as high as 500. Regards, Ramesh G On Fri, 13 May 2005 08:19:32 +0200, [EMAIL PROTECTED] wrote: Hi, you're ooking for the opposite of what can be done. One can select in share mode or for update : http://dev.mysql.com/doc/mysql/en/innodb-locking-reads.html this prevents data from being incoherent. If you want skip waiting for locks, you can make for each user a temp table containing the result of the select without for update : - create temporary table tempo select ... from table - update tempo - update table where - drop tempo even then, the table will be locked for the update statement. But you can test it. Mathias Selon Ramesh G [EMAIL PROTECTED]: Hi All, Is there a way by which I can tell the Mysql to ignore the rows that are locked by someone else and take the next available record. The problem is, I have a Query like this: Select * from Table1 where Fld1=2 FOR UPDATE Limit 1 I will have multiple clients running this same query with the same where clause. For the second instance of the query mysql seems to wait till the transaction of the first instance gets completed. This makes this query slow as the time taken for the transaction to complete is somewhere between 1 and 1.5 seconds. Regards, Ramesh G -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Read past Equivalent in MySQL
Yes. Martijn is correct. I am trying to skip locked rows and get the next unlocked row available. Reading uncommited data will cause unexpected problems. I don't want to do that. Is there a way to do this? Regards Ramesh On Fri, 13 May 2005 11:54:11 +0200, Martijn Tonies [EMAIL PROTECTED] wrote: Yes, that's what i said. He is trying to ovverride data consistency, and read uncommitted is so possible. So why not use it if it solves the problem. else, read uncommitted sould be droped from mysql. I don't think he is trying to override data consistency... with MS SQL, read past wil simply skip the locked records and return a resultset without em. With regards, Martijn Tonies Database Workbench - tool for InterBase, Firebird, MySQL, Oracle MS SQL Server Upscene Productions http://www.upscene.com -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Read past Equivalent in MySQL
I am using InnoDB only. But, it's not skipping locked rows. regards Ramesh On Fri, 13 May 2005 12:11:12 +0200, Martijn Tonies [EMAIL PROTECTED] wrote: Yes. Martijn is correct. I am trying to skip locked rows and get the next unlocked row available. Reading uncommited data will cause unexpected problems. I don't want to do that. Is there a way to do this? Use InnoDB and you don't _have_ to skip past locked records :-) With regards, Martijn Tonies Database Workbench - tool for InterBase, Firebird, MySQL, Oracle MS SQL Server Upscene Productions http://www.upscene.com -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Read past Equivalent in MySQL
Hi All, Is there a way by which I can tell the Mysql to ignore the rows that are locked by someone else and take the next available record. The problem is, I have a Query like this: Select * from Table1 where Fld1=2 FOR UPDATE Limit 1 I will have multiple clients running this same query with the same where clause. For the second instance of the query mysql seems to wait till the transaction of the first instance gets completed. This makes this query slow as the time taken for the transaction to complete is somewhere between 1 and 1.5 seconds. Regards, Ramesh G -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]