Re: [sqlite] What's the purpose of the "automatic index on" warning message?

2014-04-08 Thread Simon Slavin
On 8 Apr 2014, at 2:22pm, Jens Miltner wrote: > So what would cause SQLite not being able to use one of the two indexes I > have? First, run "ANALYZE". Then run "EXPLAIN QUERY PLAN ". This may give you some clues about how SQLite is understanding your SELECT requirements when

Re: [sqlite] What's the purpose of the "automatic index on" warning message?

2014-04-08 Thread Clemens Ladisch
Jens Miltner wrote: > apart from a JOIN statement, there is no WHERE clause relating to table "a" For purposes of optimization, an inner join is the same as a WHERE clause. > LEFT JOIN a ON a.b_id=b.id AND a.identifier=x.identifier An outer join, however, requires that the left table is used

Re: [sqlite] What's the purpose of the "automatic index on" warning message?

2014-04-08 Thread Eduardo Morras
On Tue, 08 Apr 2014 15:22:18 +0200 Jens Miltner wrote: > CREATE INDEX a_idx1 ON a(b_id); > CREATE INDEX a_idx2 ON a(identifier, b_id); > > both of which could be used according to the JOIN statement and/or > the CASE statement (if this part would use an index at all). > > > I

Re: [sqlite] What's the purpose of the "automatic index on" warning message?

2014-04-08 Thread Jens Miltner
Am 07.04.2014 um 18:42 schrieb Richard Hipp : > On Mon, Apr 7, 2014 at 11:51 AM, Jens Miltner wrote: > >> We get an sqlite3_log() message with errorCode 284 and message "automatic >> index on ...". >> I assume this is some performance penalty warning, but I have

Re: [sqlite] What's the purpose of the "automatic index on" warning message?

2014-04-07 Thread Richard Hipp
On Mon, Apr 7, 2014 at 11:51 AM, Jens Miltner wrote: > We get an sqlite3_log() message with errorCode 284 and message "automatic > index on ...". > I assume this is some performance penalty warning, but I have no idea what > to make of it: > > We do have an explicit index on the