Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Query causes (Errcode: 28)
August 4, 2005, 4:31 pm
rate this thread
select p.products_ship_price, p.products_id, p.products_model,
pd.products_name, p.products_quantity, p.products_image, p.products_price,
p.products_date_added, p.products_last_modified, p.products_date_available,
p.products_status, p2c.categories_id from products p, products_description
pd, products_to_categories p2c where p.products_id = pd.products_id and
pd.language_id = '1' and p.products_id = p2c.products_id and
pd.products_name like '%3219%' or p.products_model like '%3219%' order by
If I remove either
or p.products_model like '%3219%'
pd.products_name like '%3219%'
The query will run fine 30 Results for Model and 3 products for Name. While
it is running it will load the Temp directory. I moved the DB to one of my
64bit boxes with 8GB Ram and a 200GB drive mysql 4.1.12 Max and it just
runs longer before it throws the error. The Database has 11000 products in
it but we have the same issue with a database with 5K products.
Can this query be the problem. It is from OSC Max
Lead Software Developer
(954) 272-4961 ext. 206
(727) 239-3823 Cell
Re: Query causes (Errcode: 28)
Felix Geerinckx schrieb:
I don't know if I'm right but could it be that you produce a Cartesian
Product with your query?
Maybe it might help to use a real (INNER) JOIN like
SELECT p.products_ship_price, p.products_id, ..., p2c.categories_id
FROM products p INNER JOIN products_description pd ON p.products_id =
INNER JOIN products_to_categories p2c ON p.products_id =
WHERE pd.language_id = '1' AND pd.products_name like '%3219%' OR
p.products_model like '%3219%'
ORDER BY pd.products_name
Please note that I am NOT SURE which conditions are the most important
ones and whether or not you will have to use brackets ("(..)") in order
to group the WHERE... AND.. OR.. parts in order to get the desired
As well I'm NOT SURE if I got all JOINS correct! Please double check
before you use it!
Anyway, I'm pretty sure that you have to use the JOIN keyword in order
to make your query faster.
- » mysqldump, entire table in one insert, but multiple lines, how?
- — Next thread in » MySQL Database Forum
- » Americanas.com SALDO de TVs Com at 80% de Desconto (29798)
- — Newest thread in » MySQL Database Forum