2026-03-12 20:23:15
This commit is contained in:
12
vdh/stats.sql
Normal file
12
vdh/stats.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
set echo on
|
||||
drop table t;
|
||||
create table t (x int primary key, y int);
|
||||
insert into t values(1,1);
|
||||
commit;
|
||||
BEGIN
|
||||
dbms_stats.gather_schema_stats('TEST', NULL, FALSE, 'FOR ALL INDEXED COLUMNS', NULL, 'DEFAULT', TRUE);
|
||||
END;
|
||||
/
|
||||
select count(*) from user_tables where num_rows is not null;
|
||||
select count(*) from user_indexes where num_rows is not null;
|
||||
select count(distinct column_name) from user_tab_histograms;
|
||||
Reference in New Issue
Block a user