Re: [sqlite] Poor query planning for virtual tables

2010-04-09 Thread Alexey Pechnikov
Hello! On Friday 09 April 2010 18:27:52 Roger Binns wrote: > > Virtual table _doesn't_ use any index but query planner show this: > > 0|2|TABLE role_fts VIRTUAL TABLE INDEX 0: > > It is showing the results of the BestIndex virtual table method. Thanks. So the problem is in the FTS3 extension onl

Re: [sqlite] Poor query planning for virtual tables

2010-04-09 Thread Roger Binns
On 04/09/2010 12:27 AM, Alexey Pechnikov wrote: > Virtual table _doesn't_ use any index but query planner show this: > 0|2|TABLE role_fts VIRTUAL TABLE INDEX 0: It is showing the results of the BestIndex virtual table method. Roger ___ sqlite-users mail

Re: [sqlite] Poor query planning for virtual tables

2010-04-09 Thread Alexey Pechnikov
Hello! On Friday 09 April 2010 01:28:18 Jay A. Kreibich wrote: > Exactly like every other query the database makes? Why would > this be different? Virtual table _doesn't_ use any index but query planner show this: 0|2|TABLE role_fts VIRTUAL TABLE INDEX 0: Why planner don't show full-teable

Re: [sqlite] Poor query planning for virtual tables

2010-04-08 Thread Jay A. Kreibich
On Fri, Apr 09, 2010 at 12:50:56AM +0400, Alexey Pechnikov scratched on the wall: > Hello! > > May be is needed to show this more informatively. The record > "TABLE role_fts VIRTUAL TABLE INDEX 0:" is not useful I think. http://sqlite.org/fts3.html 1.3 Simple FTS3 Queries [...] FT

Re: [sqlite] Poor query planning for virtual tables

2010-04-08 Thread Alexey Pechnikov
Hello! On Friday 09 April 2010 00:11:56 Jay A. Kreibich wrote: > Virtual Tables are completely abstract to the query planner. The > only way to do any type of indexed or high efficiency lookup is if > the virtual table allows that to happen. Otherwise, there is > nothing the query planne

Re: [sqlite] Poor query planning for virtual tables

2010-04-08 Thread Jay A. Kreibich
On Thu, Apr 08, 2010 at 11:52:13PM +0400, Alexey Pechnikov scratched on the wall: > > 1. With ordinary tables - fast > 2. With ordinary tables and virtual table - very slow > > select role_exist.rowid as rowid, role.* from role_exist, role, role_fts > where role_exist.rowid=role.rowid and role

[sqlite] Poor query planning for virtual tables

2010-04-08 Thread Alexey Pechnikov
Hello! The SQLite library is builded from trunk af3b72d94a1b6513f02402af3ada5fb5dd390151 1. With ordinary tables - fast explain query plan select role.rowid as rowid, role.* from role_exist, role where role_exist.rowid=role.rowid; 0|0|TABLE role_exist 1|1|TABLE role USING PRIMARY KEY select r