> 
> Hello i use this query:
> 
> select i.item_id
> from orders o
> INNER JOIN item i ON i.nr=i.nr

Should the line above not be
... ON i.nr = o.nr ?

> INNER JOIN user_cart u ON u.nr=i.nr
> where (i.count !=0 or i.count!=NULL) and i.isactive=1  and i.kolWo>0
> order by i.count DESC
> LIMIT 5
> 
> It works quickly without ORDER BY
> With ORDER BY,  CPU goes to 100% and I have to wait.
> i.count has Btree Index
> Allways if I use order by is the query very slow also ORDER BY
> i.item_id is slow to.
> i.item_id, i.nr has Btree indexes.
> 
> Mysql version 5.0.45-5
> 
> Any Ideas?


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to