1. 环境: 表记录900w条;
2. 使用:count(*), count(rowid), count(主键) 都需要30多秒
3. 使用语句查看FSFI:
select tablespace_name,sqrt(max(blocks)/sum(blocks))* (100/sqrt(sqrt(count(blocks)))) FSFI
from dba_free_space
group by tablespace_name order by 1;
Oracle count(*) 耗时长解决实况
本文导语: 1. 环境: 表记录900w条; 2. 使用:count(*), count(rowid), count(主键) 都需要30多秒 3. 使用语句查看FSFI: select tablespace_name,sqrt(max(blocks)/sum(blocks))* (100/sqrt(sqrt(count(blocks)))) FSFI from dba_free_space group by tablespace_name order by 1...
1. 环境: 表记录900w条;
2. 使用:count(*), count(rowid), count(主键) 都需要30多秒
3. 使用语句查看FSFI:
select tablespace_name,sqrt(max(blocks)/sum(blocks))* (100/sqrt(sqrt(count(blocks)))) FSFI
from dba_free_space
group by tablespace_name order by 1;