4 messages in com.mysql.lists.mysqlRE: Performance: LIMIT 1 with UPDATE
FromSent OnAttachments
Robert DiFalco29 Aug 2006 09:05 
Robert DiFalco29 Aug 2006 10:08 
Rick James29 Aug 2006 11:50 
Robert DiFalco29 Aug 2006 11:53 
Subject:RE: Performance: LIMIT 1 with UPDATE
From:Rick James (rja@yahoo-inc.com)
Date:08/29/2006 11:50:10 AM
List:com.mysql.lists.mysql

Maybe it is the tiny extra time to parse the unnecessary " LIMIT 1"?

-----Original Message----- From: Robert DiFalco [mailto:rdif@tripwire.com] Sent: Tuesday, August 29, 2006 10:09 AM To: mys@lists.mysql.com; inte@lists.mysql.com Subject: RE: Performance: LIMIT 1 with UPDATE

FWIW, my preliminary testing shows no performance increase for adding LIMIT 1 to the following construct:

[ SELECT | UPDATE ] WHERE Table.UniqueID = <N>

In fact, there seems to be a slight performance edge to NOT appending LIMIT 1 to the statement.

Does using LIMIT 1 with UPDATE provide a performance improvement when the WHERE condition is on a unique index or primary key?