Re: [sqlite] Non-optimal query plan

2014-09-25 Thread Rob Golsteijn
>> Hi List, >> >> I was looking at the query plan of a rather simple query, but I don't >> understand why sqlite would choose this query plan. >> >> ...I was surprised that sqlite came up with the inferior query plan... >> >> Note: After an "analyze aaa" (on a decently populated table) sqlite

Re: [sqlite] Non-optimal query plan

2014-09-24 Thread RSmith
On 2014/09/24 16:52, Rob Golsteijn wrote: Hi List, I was looking at the query plan of a rather simple query, but I don't understand why sqlite would choose this query plan. ...I was surprised that sqlite came up with the inferior query plan... Note: After an "analyze aaa" (on a decently

Re: [sqlite] Non-optimal query plan

2014-09-24 Thread Richard Hipp
On Wed, Sep 24, 2014 at 10:52 AM, Rob Golsteijn wrote: > > Sqlite decides to create an AUTOMATIC INDEX (time complexity O(n log n)) > which it then uses to iterate table aaa1. This index is not re-used for > anything else (it can't be re-used since 'type' is not used