> Hi Clodo, > > I believe Sqlite uses B-trees, unless one links in the R-tree module or > uses the FTS feature (Full Text Search). > > I don't know almost nothing about the internal implementation of a database engine, i need to study to understand your reply :) > I believe you wrote earlier that the new "INDEXED BY" feature solved > your problem, but you saw something in the documentation that dissuaded > you. Do you mind saying just what it was that seemed problematic? > > Sorry but i have some difficult to understand your english... if i understand your message correctly, i actually use "INDEXED BY" to force the use of the index, but this page: http://www.sqlite.org/lang_indexedby.html say: "Some SQL database engines provide non-standard "hint" mechanisms which can be used to give the query optimizer clues about what indices it should use for a particular statement. The INDEX BY clause of SQLite is /not/ a hinting mechanism and it should not be used as such." [...] "The INDEXED BY clause is /not/ intended for use in tuning the preformance of a query. The intent of the INDEXED BY clause is to raise a run-time error if a schema change".
For that i'm looking for another better solution. > To mention a variation of MikeW's suggestion, since you tend to have > millions of records, with often only a few requiring an update, you > might want to keep a small table containing only the record numbers of > the rows that need updating. The increase in disk space sounds like it > would be minimal. > Yes, - an additional table is a solution; - using timestamp "last_check" and not a boolean is another solution, because with a "variation" of values the index are used also after an analyze; - and maybe exists other solutions. But... i'm optimizing/tuning my software, and i discover this problem "random" during hundred of "explain query"... i'm trying to understand the "logic" (if exists) behind this problem, to understand if other query with a similar problem can be also affected. And also for giving feedback, for improving SqLite, -IF- this is a bug :) Thanks for you reply! Bye _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users