Re: Problem with Slow Update Query

2004-08-10 Thread Michael Stassen
An index on domain cannot be used to satisfy your WHERE clause, because you are comparing the result of a function performed on domain to a value. As soon as you feed your column to a function, you lose the use of an index on that column. So, each and every one of these queries performs a full

Re: Problem with Slow Update Query

2004-08-10 Thread SGreen
First create a table with the "fixed" domain names: CREATE TABLE FixedDomains SELECT DISTINCT domain, left( domain, instr( domain, '.'> ) -1 ) as newdomain FROM url_cat Index your new table (for speed): ALTER FixedDomains ADD INDEX (Domain) *** NOTE: You really want to review (and modify, if n