iconsis Posted December 12, 2006 Share Posted December 12, 2006 [code]select count(distinct p.products_id) as total from products p left join manufacturers m using(manufacturers_id), products_description pd left join specials s on p.products_id = s.products_id, categories c, products_to_categories p2c,products_attributes pa where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id[/code] above query is used with custom oscommerce site, pls any one to optimize this query. because this is query take more query timing and server problem.Best Regards,iconsis online. Quote Link to comment Share on other sites More sharing options...
fenway Posted December 15, 2006 Share Posted December 15, 2006 Why is only half of it in proper JOIN syntax? And could you post the EXPLAIN? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.