On Thu, Jun 27, 2013 at 2:34 AM, Hick Gunter <h...@scigames.at> wrote:
> Two questions: > > Does the NGQP change the way virtual table methods (specfically > xBestIndex) are called? I have been using virtual table virtual fields > (named __use_index_<n>) to make the xBestIndex method return large costs > when not using the suggested index. > I'm not sure what you mean here... The virtual table API is unchanged. The NGQP calls the xBestIndex method as before, but it calls xBestIndex a different number of times and in a different order. This should not make any difference to the virtual table implementation, though. The NGQP is more sensitive to having proper costs. I had to fix bugs in the cost computations of some of the existing virtual tables. The legacy query planner is tolerant of those bugs, while the NGQP is not. > > Does the new draft sqlite3_stmt_status interface tally virtual table > method calls (i.e. xNext)? > No, I don't think it does. the SQLITE_STMTSTATUS_FULLSCAN_STEP counter is only incremented for OP_Next or OP_Prev operations that are part of a full table scan. But SQLite has no way of knowing if the underlying virtual table is doing a full table scan or not, so it does not increment the counter on OP_VNext operations (which invoke xNext). > > -----Ursprüngliche Nachricht----- > Von: Richard Hipp [mailto:d...@sqlite.org] > Gesendet: Mittwoch, 26. Juni 2013 16:09 > An: General Discussion of SQLite Database > Betreff: [sqlite] The next-generation query planner > > The next-generation query planner (NGQP) is a rewrite of the query planner > for SQLite that is faster (reduced run-time for sqlite3_prepare()) and > generates better plans for queries (reducing the run-time for > sqlite3_step()). More information about the NGQP is available here: > > http://www.sqlite.org/draft/queryplanner-ng.html > > We've run literally millions and millions of test cases on the NGQP with > no problems. We've tested in on Linux, Windows, Mac, OpenBSD, and Solaris, > and on 32-bit and 64-bit systems. The Fossil server that manages the > SQLite website is running NGQP. The version of Firefox on which this email > is being composed is running the NGQP. Everything seems to work great. > > Nevertheless, it is important that you test the NGQP in your application. > > Amalgamations for the latest SQLite containing the NGQP are available from > the http://www.sqlite.org/draft/download.html page. This should be a > drop-in replacement for the amalgamation you are currently using. There > are no new APIs or compiler flags to fuss with. Everything works exactly > as it did before, only a little faster. You should be able to simply > recompile and end up with an application that (hopefully) runs a little > faster. > > Please try this out, and let me know if of your successes and of any > problems you encounter. > > -- > D. Richard Hipp > d...@sqlite.org > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > > -------------------------------------------------------------------------- > Gunter Hick > Software Engineer > Scientific Games International GmbH > Klitschgasse 2 – 4, A - 1130 Vienna, Austria > FN 157284 a, HG Wien > Tel: +43 1 80100 0 > E-Mail: h...@scigames.at > > This e-mail is confidential and may well also be legally privileged. If > you have received it in error, you are on notice as to its status and > accordingly please notify us immediately by reply e-mail and then delete > this message from your system. Please do not copy it or use it for any > purposes, or disclose its contents to any person as to do so could be a > breach of confidence. Thank you for your cooperation. > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- D. Richard Hipp d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users