>> On 8/31/06, Harrison Fisk ****** <[EMAIL PROTECTED]> ******* wrote: >> Hello, >> >> On Aug 31, 2006, at 5:12 AM, Kim Christensen wrote: >> >>> Hey list; >>> >>> I posted this message under an earlier thread which touched the same >>> subject - but I realized my case could be slightly different, thus >>> posting a new thread here. Sorry for any inconvenience. >>> >>> I have two tables, one of which is a list over products which all have >>> unique product id's (product_id). The other table, items, is a list >>> over the products' corresponding prices and stock info; one row per >>> each one of our supplier that has the item. >> >> The problem is that your product_id is an INT in one table and a >> VARCHAR in the other. This will cause MySQL to have to do >> conversions of data types, which means it can't use indexes. Switch >> product_id to be an INT and both tables and it should solve your >> performance problems.
> Ouch. I reduced the DELETE... query time to 0.4 secs in total after > changing the second table's product_id to an INT. Thanks alot, I sure > wouldn't have seen this on my own after staring myself blind on this - > you've saved me lots of work! > > I'm sure gonna be more careful with the data types next time! :-) Having taken a weeklong MySQL course with Harry a number of years ago, I'm not surprised by his knowledge and acumen. It's a benefit to us all that he still frequents this mailing list. David Giragosian -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]