luchuanc
asked on
oracle sql running 4 times slows after truncate table, reload data, rebuild indexes
Hi,
We truncated a table, dropped indexes, insert data back with 0.1% new data, rebuild indexes,
analyzed table estimate 33%. But our sqls based on this table run about at least 4 times slower , some of them hung there. Did we miss a step?
Please advise ASAP.
Thanks,
Luchuan
We truncated a table, dropped indexes, insert data back with 0.1% new data, rebuild indexes,
analyzed table estimate 33%. But our sqls based on this table run about at least 4 times slower , some of them hung there. Did we miss a step?
Please advise ASAP.
Thanks,
Luchuan
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi All,
We ran the following command the that seems resolved the problem:
exec dbms_stats.gather_table_st ats('AXIUM ','HISTORY ', estimate_percent=>20, method_opt=>'FOR ALL COLUMNS SIZE 1', cascade=>true);
Thanks a lot,
Luchuan
We ran the following command the that seems resolved the problem:
exec dbms_stats.gather_table_st
Thanks a lot,
Luchuan
20% is really big
if you're going to sample such a large portion of the table, you're probably better off doing a full compute (NULL) rather than estimate.
my guess is the first time you didn't have cascade so the indexes were missed
if you're going to sample such a large portion of the table, you're probably better off doing a full compute (NULL) rather than estimate.
my guess is the first time you didn't have cascade so the indexes were missed
ASKER