Yeah. The subquery sometimes creates temporary tables, so the performance is
worse than join. Just leaving it.
David Yeung, In China, Beijing.
My First Blog:http://yueliangdao0608.cublog.cn
My Second Blog:http://yueliangdao0608.blog.51cto.com
My Msn: yueliangdao0...@gmail.com



2010/12/8 Aaron Turner <synfina...@gmail.com>

> Thanks Gavin.  Rewriting the query to not use the subselect solved the
> problem!
>
> On Tue, Dec 7, 2010 at 11:33 AM, Gavin Towey <gto...@ffn.com> wrote:
> > Mysql often handles subqueries poorly.  It's best to rewrite that as a
> JOIN instead:
> >
> > http://dev.mysql.com/doc/refman/5.1/en/rewriting-subqueries.html
> >
> > If you have further questions after doing that, show the table
> structures, the query, and the explain output.
> >
>
> --
> Aaron Turner
> http://synfin.net/         Twitter: @synfinatic
> http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix &
> Windows
> Those who would give up essential Liberty, to purchase a little temporary
> Safety, deserve neither Liberty nor Safety.
>     -- Benjamin Franklin
> "carpe diem quam minimum credula postero"
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/mysql?unsub=yueliangdao0...@gmail.com
>
>

Reply via email to