这样的一条语句在一台P4 2.4G,内存256+128的机子(未优化),基本要两分钟才运行完,但在一台专业的服务器(四路CPU,12G内存)只需要(0.0130879878998 seconds)
以下SQL执行结果:380340
SELECT count(products.products_id) as DATAOBJECT_NUM
FROM products
LEFT JOIN shopping.products_description ON shopping.products_description.products_id=products.products_id
LEFT JOIN shopping.product_types ON shopping.product_types.type_id=products.products_type
LEFT JOIN shopping.products_categories ON shopping.products_categories.categories_id=products.master_categories_id WHERE ( products_quantity >= 0 )
当然,这条语句基本也需要优化的.我看现在不必要了.