On Feb 16, 2007, at 1:34 PM, DB wrote:
Try running your query in your mysql client. See how long it takes. Also EXPLAIN the query.I'm running IC 5.4.2 with mysql. My products table includes several brands, ands each has a unique value for the category field. One brand (category=BRAND_A) has many more skus that the others, nearly 250,000.I want to display the skus from BRAND_A and the following query does thejob, however it is much slower than I expected and I can see the server's CPU load spike up while it is running. I do have the category column indexed. Can someone tell me why this is so slow? My server is a dual Xeon with 4GB of Ram. Is this query that horribly inefficient? [query type=list more=1 ml=75 sql=| SELECT sku, description, comment, category FROM products WHERE category = 'BRAND_A' |]
mysql> EXPLAIN SELECT sku, description, comment, category FROM products WHERE category = 'BRAND_A'
http://dev.mysql.com/doc/refman/5.0/en/query-speed.html Bill Carr Bottlenose - Wine & Spirits eBusiness Specialists (877) 857-6700 http://www.bottlenose-wine.com _______________________________________________ interchange-users mailing list suppressed http://www.icdevgroup.org/mailman/listinfo/interchange-users
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.