begin
dbms_stats.gather_table_stats(ownname => USER, tabname => 'TMS_ROUTE_HEADER');
end;
BEGIN
DBMS_STATS.set_table_stats (ownname => USER,
tabname => 'TMS_ROUTE_HEADER',
numrows => 100,
numblks =>5
);
END;
begin
dbms_stats.delete_table_stats(ownname => USER,
tabname => 'TMS_ROUTE_HEADER');
end;
select count(1) from tms_route_header rh, tms_route_stop rs
where rs.truck_route_instance_id=rh.truck_route_instance_id;
begin
dbms_stats.create_stat_table(ownname => 'TMS',stattab => 'STAT_TABLE');
end;
begin
dbms_stats.import_table_stats(ownname => 'TMS',tabname => 'TMS_ROUTE_HEADER',stattab => 'STAT_TABLE');
end;
begin
dbms_stats.export_table_stats(ownname => 'TMS',tabname => 'TMS_ROUTE_HEADER', stattab => 'STAT_TABLE');
end;
select * from STAT_TABLE