On Tue, Mar 28, 2017 at 11:00 AM, Hick Gunter <h...@scigames.at> wrote:
> >FWIW, I've often wondered about the cost estimates of real tables versus > virtual tables, especially since many vtables implementations don't involve > real IO but pure in-memory computations. There's >very little advice or > documentation on this important subject, and Max's email reveals that > empirical testing leading to ad-hoc heuristics are vulnerable to breaking > when SQLite itself evolves. More >guidance and perhaps even some "normative" > >documentation is needed IMHO. Thanks, --DD ______________________________ > _________________ > > The "estimated cost" is described as "how many disk IO operations are > expected". Version higher than 3.8.2 allow setting an "estimatedRows" > (default: 25) and versions above 3.9.0 allow setting a flag that indicates > that 0 or 1 rows will be returned (i.e. the constraints form a "unique > index"). > Thanks for the RTFM. That helps. Looks like I have about 3 years worth of catch-up to do on sqlite3_index_info. Sorry for hijacking Max's thread, which is why his costs seems to be ignored. --DD /* Fields below are only available in SQLite 3.8.2 and later */ sqlite3_int64 estimatedRows; /* Estimated number of rows returned */ /* Fields below are only available in SQLite 3.9.0 and later */ int idxFlags; /* Mask of SQLITE_INDEX_SCAN_* flags */ /* Fields below are only available in SQLite 3.10.0 and later */ sqlite3_uint64 colUsed; /* Input: Mask of columns used by statement */ _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users