由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Database版 - Oracle Group and Index question
相关主题
SQL 2000 create index 問題common misconception in Oracle
SQL aggregate multiple columns in ACCESSBJ,那个COLUMNSTORE INDEX是不是BITMAP INDEX啊
SQL的index到底派什么用?两个列联合作Primary Key,还需要单独建index吗?
请教SQLquery: in sql server 2005
SQL multiply all values of a column in table (转载)Join optimization
Questions about building a database(Maybe ACCESS?)请教 sql server index问题
一个关于T-SQL的问题请教三个Key的property,
sql请教高手请指点: How to query specific data in all columns efficiently
相关话题的讨论汇总
话题: index话题: column话题: date话题: group话题: table
进入Database版参与讨论
1 (共1页)
l******r
发帖数: 99
1
I have a table A, which has 50 millions records.
In this table A, I have two columns id and date.
if I run the following query:
select date, sum(id) from A group by date
it will take 10 minutes to finish.
what can I do to improve the performance?
there are 3 bitmap indexes for this table A.
index 1 is on column id.
index 2 is on column date.
index 3 is on column id and column date.
Please help. Thanks.
B*****g
发帖数: 34098
2
1. please post execution plan
2. will data in this table be updated?
3. what datatype is for column "date"

【在 l******r 的大作中提到】
: I have a table A, which has 50 millions records.
: In this table A, I have two columns id and date.
: if I run the following query:
: select date, sum(id) from A group by date
: it will take 10 minutes to finish.
: what can I do to improve the performance?
: there are 3 bitmap indexes for this table A.
: index 1 is on column id.
: index 2 is on column date.
: index 3 is on column id and column date.

l******r
发帖数: 99
3

I am using Oracle SQL Developer, here is the execution plan:
the same query like above,
operation object_name options cost
select statement 162443
hash group by 162443
table access tableA full 160439
Yes, by a hourly SQL loading process.
DATETIME

【在 B*****g 的大作中提到】
: 1. please post execution plan
: 2. will data in this table be updated?
: 3. what datatype is for column "date"

1 (共1页)
进入Database版参与讨论
相关主题
高手请指点: How to query specific data in all columns efficientlySQL multiply all values of a column in table (转载)
这个cassandra paging的解决方案怎么样? (转载)Questions about building a database(Maybe ACCESS?)
sql question一个关于T-SQL的问题
扳机问题求助sql请教
SQL 2000 create index 問題common misconception in Oracle
SQL aggregate multiple columns in ACCESSBJ,那个COLUMNSTORE INDEX是不是BITMAP INDEX啊
SQL的index到底派什么用?两个列联合作Primary Key,还需要单独建index吗?
请教SQLquery: in sql server 2005
相关话题的讨论汇总
话题: index话题: column话题: date话题: group话题: table