3 ms·
In Oracle, stats can change a CBO query plan in ways that adversely affect performance. To address this, Oracle 7 added hints, and then 8i introduced the abili
by chasil 4y ago
In Oracle, stats can change a CBO query plan in ways that adversely affect performance.
To address this, Oracle 7 added hints, and then 8i introduced the ability to "pin" an existing optimizer plan to a query.
Stats are run here and there in SQLite, so I can see how bad stats could throw the cost-based optimizer (CBO) into bad performance.
Stats can be manually run with the ANALYZE command. This should likely be done (among other things) prior to distributing SQLite databases to an audience, or perhaps in weekly maintenance of active databases undergoing extensive DML.
https://www.sqlite.org/lang_analyze.html https://www.sqlite.org/lang_analyze.html