由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - compare two large tables SQL
相关主题
SQL combine two tables into one table and add a new columnSQL find distinct values in large table (转载)
SQL combine two columns from two different tables no shared columns关于 unique paths,总是过不了 OJ, 请牛牛们帮忙看看~~~先谢过。。。
这道FB题如何解?create a unique primary key that can be indexed IBM netezza (转载)
SQL fast search in a 10 million records table[电话面试] 非死不可 2
create table on SQL server from python pyodbc (转载)请帮忙回答一个SQL问题
请教个SQL的问题亚麻 三连击
这题怎么做为什么加个结束符leetcode就run time error呢?
求教一个SQL的问题error export sql table from IBM netezza database to a file
相关话题的讨论汇总
话题: error话题: sql话题: tables话题: select话题: where
进入JobHunting版参与讨论
1 (共1页)
l******9
发帖数: 579
1
I am comparing two tables to make sure they are same row by row and column
by column on SQL server.
SELECT *
FROM t1, t2
WHERE t1.column1 = t2.column1 AND t1.column2 = t2.column2
AND t1.column3 = t2.column3 AND t1.column4 != t2.column4
The tables are vey large, more than 100 million.
I got error:
ERROR [HY000] ERROR: 9434 : Not enough memory for merge-style join
Are there better ways to do this comparison.
thanks !
l*********8
发帖数: 4642
2
CREATE UNIQUE INDEX
ON t1(column1, column2, column3);
CREATE UNIQUE INDEX
ON t2(column1, column2, column3);
SELECT 'different'
FROM dual
WHERE EXIST
(
SELECT *
FROM t1, t2
WHERE t1.column1 = t2.column1 AND t1.column2 = t2.column2
AND t1.column3 = t2.column3 AND t1.column4 != t2.column4
);

【在 l******9 的大作中提到】
: I am comparing two tables to make sure they are same row by row and column
: by column on SQL server.
: SELECT *
: FROM t1, t2
: WHERE t1.column1 = t2.column1 AND t1.column2 = t2.column2
: AND t1.column3 = t2.column3 AND t1.column4 != t2.column4
: The tables are vey large, more than 100 million.
: I got error:
: ERROR [HY000] ERROR: 9434 : Not enough memory for merge-style join
: Are there better ways to do this comparison.

l******9
发帖数: 579
3
i got error:
CREATE UNIQUE INDEX Pindex1
ON t1 (column1, column2, column3);
ERROR [HY000] ERROR: CREATE INDEX not supported in this release
Thanks

【在 l*********8 的大作中提到】
: CREATE UNIQUE INDEX
: ON t1(column1, column2, column3);
: CREATE UNIQUE INDEX
: ON t2(column1, column2, column3);
: SELECT 'different'
: FROM dual
: WHERE EXIST
: (
: SELECT *
: FROM t1, t2

l*********8
发帖数: 4642
4
不让建索引太奇怪了。
看了一下, 你这个好像是IBM一个系统里的SQL。 不知道有哪些限制。

【在 l******9 的大作中提到】
: i got error:
: CREATE UNIQUE INDEX Pindex1
: ON t1 (column1, column2, column3);
: ERROR [HY000] ERROR: CREATE INDEX not supported in this release
: Thanks

1 (共1页)
进入JobHunting版参与讨论
相关主题
error export sql table from IBM netezza database to a filecreate table on SQL server from python pyodbc (转载)
SQL query 求解!请教个SQL的问题
招聘SQL SERVER DBA这题怎么做
一个熟人猎头来的信件 - SQL developer 大约年薪 90K左右(本人个人估计,不代表猎头的意思)求教一个SQL的问题
SQL combine two tables into one table and add a new columnSQL find distinct values in large table (转载)
SQL combine two columns from two different tables no shared columns关于 unique paths,总是过不了 OJ, 请牛牛们帮忙看看~~~先谢过。。。
这道FB题如何解?create a unique primary key that can be indexed IBM netezza (转载)
SQL fast search in a 10 million records table[电话面试] 非死不可 2
相关话题的讨论汇总
话题: error话题: sql话题: tables话题: select话题: where