Search Hanging

rainbowsheep <[email protected]>
Newsgroups gmane.comp.web.oscommerce.general
Message-ID <6d4f9d34e7bb95b925541a8be88e35a2@osCommerce-Forums>
This message was sent from: General Support
http://forums.oscommerce.com/viewtopic.php?p=227561#227561
----------------------------------------------------------------

Whenever I do a search in the catalog, the mysql process uses all the CPU power and just hangs and doesn't return anything.

Here's an example search query that hangs mysql:

 SELECT count( DISTINCT p.products_id ) AS total
FROM authors_to_games aut2g, artists_to_games art2g, publisher_to_games pub2g, 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
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 

Any obvious things wrong with this query?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.