Hi guys, In an attempt to understand a slow query I've had a quick look at the contents of the sqlite_stat1 table. It looks like the stat column contains a series of integers like:
<number of rows in index> <number of rows divided by distinct values of first indexed column> <number of rows divided by distinct values of second indexed column> ... Is this observation correct? And if so, does sqlite essentially assume that the rows are equally distributed amongst all distinct values of the column? It seems like an assumption that will definitely fail for certain kinds of data, and since sqlite generally deals well with contingencies I'd be surprised if that's the only criteria used to select an index by the query planner... It looks like the ENABLE_STAT2/STAT4 options generate histogram data which would probably help for non-uniform data? Thanks, -Rowan