featuregood first issueperformancesql
描述
Recently, PRAGMA optimize has been added in SQLite, which enables auto run of analyze when it is required. For instance, when several indexes of table haven't been analyzed or the number of rows in the table has increased by 25 times or more since last analyze.
More info: https://sqlite.org/pragma.html#pragma_optimize
The proposal is to implement similar feature(or just port it from the original source) in our sql.