Reply to query optimization

Your name:

Reply:


Posted by Steve on 05/02/07 16:08

sorry for the ot-ish post.

i've got a repairs table and a price master table. each has millions of
rows. i'm trying to optimize the query below. i think the best way would be
to use an update statement with a join but i can't remember the syntax. any
thoughts?

UPDATE Repair_Order_Lines l ,
priceMaster p
SET l.IsOEM = 1
WHERE l.IsOEM = 0
AND
(
l.PartNumber = p.PartNumber
OR l.PartNumber = p.PrecedentPartNumber
)

essentially, if a repair line has a part number in the price master table,
it is considered an OEM part. both the PartNumber columns and the
PrecedentPartNumber column are VARCHAR(50). priceMaster is indexed on both.

tia,

me

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация