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 d...@sqlite.org: On Mon, Apr 7, 2014 at 11:51 AM, Jens Miltner j...@mac.com 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

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 j...@mac.com 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 understand

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 for

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 j...@mac.com 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 whatever your SELECT is. This may give you some clues about how SQLite is understanding your SELECT

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

2014-04-07 Thread Jens Miltner
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 table and column mentioned in the warning message, so I don't know what to do to

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 j...@mac.com 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 table and