由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Database版 - SQL 2000 create index 問題
相关主题
Oracle Group and Index question请问数据表里筛选变量名的写法
SQL aggregate multiple columns in ACCESSSQL的index到底派什么用?
请教SQLindexing就是设置primary key吗?
SQL 2008 Create Index vs Rebuild Index (Alter Index)有趣的Join问题,源于SQL和SAS比较。
请教 sql server index问题SQL Server Update Query - non-unique value
被人鄙视了两个列联合作Primary Key,还需要单独建index吗?
这个cassandra paging的解决方案怎么样? (转载)query: in sql server 2005
请问可不可以在sql语句中用序号表示columnJoin optimization
相关话题的讨论汇总
话题: index话题: columns话题: tableb话题: indexes话题: sql
进入Database版参与讨论
1 (共1页)
i****a
发帖数: 36252
1
need to query between TableA and TableB. and it's taking too long
because the columns on lookup do no have indexes
TableA.CustNum data can appear in any or all of the following columns in
TableB
TableB.CustNum1
TableB.CustNum2
TableB.CustNum3
about 240M rows in TableB, on index on the CustNum fields, no foreign
keys
I am thinking creating a separate table with only 3 CustNum1/2/3
columns, with indexes defined, then insert 3 columns of data into it.
but it takes 20 hours to insert with indexes de
j*****n
发帖数: 1781
2
you can still partition your table by using the old fashion. say 10 tables
that each holds 24M records and a view with UNION ALL.
would your limited log can handle 24M each time instead of 240M?
i****a
发帖数: 36252
3
that's an idea. will try this weekend. thx

tables

【在 j*****n 的大作中提到】
: you can still partition your table by using the old fashion. say 10 tables
: that each holds 24M records and a view with UNION ALL.
: would your limited log can handle 24M each time instead of 240M?

B*********L
发帖数: 700
4
Are you able to change data type for CustNum1/2/3 to reduce the size of your
index.
i****a
发帖数: 36252
5
no, they are INT. I was actually able to create index one-by-one by
issuing SQL commands
I found out doing this via managment studio interface will create all 3
indexes in one shoot in a single transaction... that's why it was taking
forever and filling up the log file

your

【在 B*********L 的大作中提到】
: Are you able to change data type for CustNum1/2/3 to reduce the size of your
: index.

a9
发帖数: 21638
6
从来不敢用managment studio创建index

【在 i****a 的大作中提到】
: no, they are INT. I was actually able to create index one-by-one by
: issuing SQL commands
: I found out doing this via managment studio interface will create all 3
: indexes in one shoot in a single transaction... that's why it was taking
: forever and filling up the log file
:
: your

g***l
发帖数: 18555
7
INDEX在三个COLUMN上?这样对查询帮助不大吧。为什么不能一个COLUMN上一个INDEX呢
,你有PK么或者CLUSTERED INDEX么,如果没有的话,NONCLUSTED INDEX也不快。
240M太多了,应该SPLIT成多个TABLE,上面套个VIEW,用VIEW给用户查询,多个TABLE的话,一个一个加INDEX快多了
1 (共1页)
进入Database版参与讨论
相关主题
Join optimization请教 sql server index问题
MySQL 5.0 cluster question被人鄙视了
如何决定index这个cassandra paging的解决方案怎么样? (转载)
问个Index的问题请问可不可以在sql语句中用序号表示column
Oracle Group and Index question请问数据表里筛选变量名的写法
SQL aggregate multiple columns in ACCESSSQL的index到底派什么用?
请教SQLindexing就是设置primary key吗?
SQL 2008 Create Index vs Rebuild Index (Alter Index)有趣的Join问题,源于SQL和SAS比较。
相关话题的讨论汇总
话题: index话题: columns话题: tableb话题: indexes话题: sql