Re: Should I be able to DELETE FROM ... WHERE .. IN ( ... ) with multiple a column key?

2009-05-31 Thread Moon's Father
As I know, IN sometimes invoke unmormal index. On Thu, May 28, 2009 at 1:15 AM, Baron Schwartz wrote: > Simon, > > On Wed, May 27, 2009 at 11:23 AM, Simon J Mudd wrote: > > per...@elem.com (Perrin Harkins) writes: > > > >> On Wed, May 27, 2009 at 6:43 AM, Simon J Mudd wrote: > >> > So is the f

Re: Should I be able to DELETE FROM ... WHERE .. IN ( ... ) with multiple a column key?

2009-05-27 Thread Baron Schwartz
Simon, On Wed, May 27, 2009 at 11:23 AM, Simon J Mudd wrote: > per...@elem.com (Perrin Harkins) writes: > >> On Wed, May 27, 2009 at 6:43 AM, Simon J Mudd wrote: >> > So is the format of the DELETE FROM .. WHERE ... IN ( ... )  clause I >> > propose valid and SHOULD the optimiser recognise this

Re: Should I be able to DELETE FROM ... WHERE .. IN ( ... ) with multiple a column key?

2009-05-27 Thread Simon J Mudd
per...@elem.com (Perrin Harkins) writes: > On Wed, May 27, 2009 at 6:43 AM, Simon J Mudd wrote: > > So is the format of the DELETE FROM .. WHERE ... IN ( ... )  clause I > > propose valid and SHOULD the optimiser recognise this and be expected > > to just find the 2 rows by searching on the prima

Re: Should I be able to DELETE FROM ... WHERE .. IN ( ... ) with multiple a column key?

2009-05-27 Thread Perrin Harkins
On Wed, May 27, 2009 at 6:43 AM, Simon J Mudd wrote: > So is the format of the DELETE FROM .. WHERE ... IN ( ... )  clause I > propose valid and SHOULD the optimiser recognise this and be expected > to just find the 2 rows by searching on the primary key? Not according to the docs: http://dev.mys

Should I be able to DELETE FROM ... WHERE .. IN ( ... ) with multiple a column key?

2009-05-27 Thread Simon J Mudd
This is in 5.0.68 and 5.1.34. I'm trying to cleanup some old data in a table which looks like the following: CREATE TABLE `transaction_history` ( `customer_id` int(10) unsigned NOT NULL default '0', `transaction_id` int(10) unsigned NOT NULL default '0', `first_timestamp` datetime NOT NULL def