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"
|
|