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 time, more than half an hour now. How do I make it faster?
Best,
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 time, more
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
] On Behalf Of chen jia
Sent: Monday, April 05, 2010 11:07 AM
To: mysql@lists.mysql.com
Subject: Slow Union Statement
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
it should not cause any issues, unless your passing too many values in id
in(1,2,...n).
Are the indexes present.
On 11/10/08, Alex K [EMAIL PROTECTED] wrote:
Hello,
It seems to me that the statement id in (id1, id2 ... idn) is much
slower than id=id1 or id=id2 ... or id=idn or I am doing
Hi Ananda,
Indexes are present. I'm passing no more 10 values.
Alex
2008/11/10 Ananda Kumar [EMAIL PROTECTED]:
it should not cause any issues, unless your passing too many values in id
in(1,2,...n).
Are the indexes present.
On 11/10/08, Alex K [EMAIL PROTECTED] wrote:
Hello,
It seems
can u please show me the explain plan for this sql and also the table
structure
explain select statement
desc table_name
On 11/10/08, Alex K [EMAIL PROTECTED] wrote:
Hi Ananda,
Indexes are present. I'm passing no more 10 values.
Alex
2008/11/10 Ananda Kumar [EMAIL PROTECTED]:
it
Hello,
It seems to me that the statement id in (id1, id2 ... idn) is much
slower than id=id1 or id=id2 ... or id=idn or I am doing something
wrong?
Thank you,
Alex
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL
Here we go:
http://pastebin.com/m2439985d
replace $company_ids by list of ids from 'companies'
replace $neg_company_ids by -1 * $company_ids
replace $location_ids by list of location ids from 'locations'
replace $all_company_ids by list of ids from 'all_companies'
The reason why I'm doing
: Speed up slow SQL statement.
Date: Fri, 26 Sep 2008 10:42:07 -0400
Good morning everyone,
I've got a sql statement that is running quite slow. I've indexed
everything I can that could possibly be applicable but I can't seem to
speed it up.
I've put up the table structures, row
distribution to any party other
than intended recipient. Sender does not necessarily endorse content
contained within this transmission.
From: [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Subject: Speed up slow SQL statement.
Date: Fri, 26 Sep 2008 10:42:07 -0400
Good morning everyone,
I've got
this
transmission.
From: [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Subject: Speed up slow SQL statement.
Date: Fri, 26 Sep 2008 10:42:07 -0400
Good morning everyone,
I've got a sql statement that is running quite slow. I've indexed
everything I can that could possibly be applicable
Good morning everyone,
I've got a sql statement that is running quite slow. I've indexed
everything I can that could possibly be applicable but I can't seem to
speed it up.
I've put up the table structures, row counts, the sql statement and
the explain dump of the sql statement all in
content contained within this transmission.
From: [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Subject: Speed up slow SQL statement.
Date: Fri, 26 Sep 2008 10:42:07 -0400
Good morning everyone,
I've got a sql statement that is running quite slow. I've indexed
everything I can that could
14 matches
Mail list logo