On 27 May 2016, at 9:02pm, Clay Gerrard <clay.gerr...@gmail.com> wrote:
> Is there a more obvious way to find this "middle" of a large ordered query > in an indexed table? Just estimating between the min and max doesn't > always seem to represent a good split since the distribution of prefixes is > not always uniform? Yeah. SQLite is designed to protect you from having to know how a balanced tree works. Also, the "count(*)" operation is not as cheap in SQLite as you might expect it to be, because the number of rows in a table isn't stored anywhere. Have you looked at the tables generated by ANALYZE ? You may have to compile your own version of SQLite (check with PRAGMA compile_options ) so that you have a version with "SQLITE_ENABLE_STAT4" enabled. See the documentation in sections 2.6.5 and 2.6.6 to see if you think either will help. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users