Temporary tables are stored in memory so they are as quick as joins.
Dusan
Ran napsal(a):
> Not necessarily to use temp tables,they are expensicve.
> Temp tables introduce extra disk IOs which slows down compare to using
> explicit JOINs which is done in memory.
>
> Here is techniques on how to rewrite a subquery with JOINs:
>
> http://dev.mysql.com/doc/refman/4.1/en/rewriting-subqueries.html
>
> Ran
> On 1/11/07, Peter Bradley <P.Bradley@stripped> wrote:
>>
>> Ysgrifennodd Tomás Abad Fernández:
>> > I dont know why thease don't work at MySql 3.21 , anyone can help
>> me to
>> make
>> > this compatible with mysql3?
>> >
>> > $query = "SELECT * FROM facturas WHERE pedido IN (SELECT orders_id
>> FROM
>> > orders WHERE user_id='".$user."') ORDER BY factura_id";
>> >
>> > Thanks for all.
>> >
>> >
>> If I remember correctly, 3.21 didn't do sub-queries. You had to use
>> temp tables.
>>
>> Someone else will correct me if I'm wrong.
>>
>>
>> Peter
>>
>> --
>> MySQL General Mailing List
>> For list archives: http://lists.mysql.com/mysql
>> To unsubscribe: http://lists.mysql.com/mysql?unsub=1
>>
>>
>