MySQL Forums
Forum List  »  InnoDB

Issues with subqueries !
Posted by: Cohen Ben
Date: April 14, 2008 02:32PM

Hello everybody !

First at all, I would like to say that I'm French, and I'm sorry if my English is not correct.

So, when I make an "EXPLAIN" on a request, I have this message :
UNCACHEABLE SUBQUERY ........... Using WHERE

On Google, I find that my problem is my user-variable.
Example :

SELECT id,nombre FROM table WHERE id_pers=10
#0.001 sec.
SELECT @id:=id AS id,nombre,(SELECT nom FROM table2 Where id_p=@id) AS nom_p FROM table WHERE id_pers=10
#6.8 sec.

there are an index on id_p, id and id_pers.

So, how I can do to solve this big problem ?
LEFT JOIN is not correct because my real request is too big.

Thank you very much for your attention.

Options: ReplyQuote


Subject
Views
Written By
Posted
Issues with subqueries !
2500
April 14, 2008 02:32PM
1805
April 14, 2008 03:49PM
1726
April 14, 2008 04:34PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.