depending on the table size, the sample size is altered per the following schedule to improve speed of execution (these values have been established by Oracle Server Tech Support “best practices”.)
100% for tables < 1M rows
30% for tables up to 10M rows
10% for tables up to 100M rows
3% for tables up to 1B rows
1% for tables > 1B rows
To reduce the risk of this inconsistency impacting the performance of the RDBMS, the gather_schema_stats()procedure forces the gathering of statistics based on the following “best practices” as established by Oracle RDBMS Server Tech GCS:
every 3 weeks for tables < 1M rows
every 4 weeks for tables up to 10M rows
every 5 weeks for tables up to 100M rows
every 6 weeks for tables up to 1B rows
every 7 weeks for tables > 1B rows
Everything Changes
-
I saw a recent tweet (on Bluesky) from SQLDaily highlighting a blog note
that Lukas Eder wrote in 2016 with the title: “Avoid using COUNT() in SQL
when you...
Acum o săptămână
Niciun comentariu:
Trimiteți un comentariu