Yes, that's the trick. Thank Rudy and Gavin.
Best,
Jia
On Mon, Apr 5, 2010 at 2:13 PM, Gavin Towey wrote:
> Union does a distinct on all results. UNION ALL will avoid that.
>
> Regards,
> Gavin Towey
>
> -Original Message-
> From: chen.1...@gmail.com [mailto:chen.1...@gmail.com] On Beha
Union does a distinct on all results. UNION ALL will avoid that.
Regards,
Gavin Towey
-Original Message-
From: chen.1...@gmail.com [mailto:chen.1...@gmail.com] On Behalf Of chen jia
Sent: Monday, April 05, 2010 11:07 AM
To: mysql@lists.mysql.com
Subject: Slow Union Statement
Hi there,
On 04/05/2010 02:06 PM, chen jia wrote:
> Hi there,
>
> I run simple statement like this:
>
> create table c
> select * from a
> union
> select * from b;
>
> where table a has 90,402,534 rows, and table b has 33,358,725 rows.
> Both tables have the same three variables.
>
> It's taken a long ti