Re: [sqlite] Multi-column index is not used with IN operator

2013-01-17 Thread Selen Schabenberger
ject: Re: [sqlite] Multi-column index is not used with IN operator > >On 01/17/2013 06:32 PM, Selen Schabenberger wrote: >> >> Dan, I have just realised that with the sqlite_stat3 table, the query >> optimizer uses the INDEX IDX_TAG. When I drop this table, the PK is used

Re: [sqlite] Multi-column index is not used with IN operator

2013-01-17 Thread Selen Schabenberger
to speed up this query or you think it is a bug in the optimizer?  - Selen > > From: Selen Schabenberger <selen_oz...@yahoo.com> >To: General Discussion of SQLite Database <sqlite-users@sqlite.org>; Dan >Kennedy <danielk1...@g

Re: [sqlite] Multi-column index is not used with IN operator

2013-01-16 Thread Selen Schabenberger
eral Discussion of SQLite Database <sqlite-users@sqlite.org> >Sent: Wednesday, January 16, 2013 3:40 PM >Subject: Re: [sqlite] Multi-column index is not used with IN operator > >On 01/16/2013 09:22 PM, Selen Schabenberger wrote: >> PRAGMA foreign_keys=OFF; >> BEGI

Re: [sqlite] Multi-column index is not used with IN operator

2013-01-16 Thread Selen Schabenberger
ORDER BY   - Selen > > From: Dan Kennedy <danielk1...@gmail.com> >To: sqlite-users@sqlite.org >Sent: Wednesday, January 16, 2013 3:14 PM >Subject: Re: [sqlite] Multi-column index is not used with IN operator > >On 01/16/2013 09:04 PM, Selen Schabenberger wrote: >&

Re: [sqlite] Multi-column index is not used with IN operator

2013-01-16 Thread Selen Schabenberger
day, January 16, 2013 2:56 PM Subject: Re: [sqlite] Multi-column index is not used with IN operator On 01/16/2013 08:48 PM, Selen Schabenberger wrote: >>However, in 3.7.16, the penalty for the external sort is >>(3*nRow*log10(nRow)) and there is no discount for using a >>coveri

Re: [sqlite] Multi-column index is not used with IN operator

2013-01-16 Thread Selen Schabenberger
> To: sqlite-users@sqlite.org Sent: Wednesday, January 16, 2013 1:12 PM Subject: Re: [sqlite] Multi-column index is not used with IN operator On 01/16/2013 06:25 PM, Selen Schabenberger wrote: > Below is the output of the dump. If it does not help reproduce the error, > then I can try to

Re: [sqlite] Multi-column index is not used with IN operator

2013-01-16 Thread Selen Schabenberger
-users@sqlite.org Sent: Wednesday, January 16, 2013 1:12 PM Subject: Re: [sqlite] Multi-column index is not used with IN operator On 01/16/2013 06:25 PM, Selen Schabenberger wrote: > Below is the output of the dump. If it does not help reproduce the error, > then I can try to share

Re: [sqlite] Multi-column index is not used with IN operator

2013-01-16 Thread Selen Schabenberger
To: sqlite-users@sqlite.org Sent: Wednesday, January 16, 2013 12:05 PM Subject: Re: [sqlite] Multi-column index is not used with IN operator On 01/16/2013 05:13 PM, Selen Schabenberger wrote: > I attach a small database where it is possible to reproduce the > issue. I deleted all irrelevant tab

Re: [sqlite] Multi-column index is not used with IN operator

2013-01-16 Thread Selen Schabenberger
 SUBQUERY 1    Hope someone can help. - Selen From: Selen Schabenberger <selen_oz...@yahoo.com> To: General Discussion of SQLite Database <sqlite-users@sqlite.org>; Richard Hipp <d...@sqlite.org> Sent: Wednesday, January 2, 2013 12

Re: [sqlite] Query planning with concatened vs single index

2013-01-14 Thread Selen Schabenberger
By the way I am using the SQLite version 3.7.15.2. I do not see the same behaviour with the version 3.6. Selen From: Selen Schabenberger <selen_oz...@yahoo.com> To: Simon Slavin <slav...@bigfraud.org>; General Discussion of SQLite Database &

Re: [sqlite] Query planning with concatened vs single index

2013-01-14 Thread Selen Schabenberger
rg> To: Selen Schabenberger <selen_oz...@yahoo.com>; General Discussion of SQLite Database <sqlite-users@sqlite.org> Sent: Monday, January 14, 2013 3:33 PM Subject: Re: [sqlite] Query planning with concatened vs single index On 14 Jan 2013, at 2:30pm, Selen Schabenberger <selen_oz...@y

[sqlite] Query planning with concatened vs single index

2013-01-14 Thread Selen Schabenberger
Hi, Having an index on 3 integer columns (column1, column2, column3), the analyse command generates the stat1 and stat3 tables. I see the following statistics for this index in the sqlite_stat1 table: "4600132 1289 1275 1" When I execute the following SQL query, this index is not used but the

Re: [sqlite] Multi-column index is not used with IN operator

2013-01-02 Thread Selen Schabenberger
would really appreciate any suggestions. Happy new year! Regards,Selen --- On Fri, 12/14/12, Richard Hipp <d...@sqlite.org> wrote: From: Richard Hipp <d...@sqlite.org> Subject: Re: [sqlite] Multi-column index is not used with IN operator To: "Selen Schabenberger" <selen_o

Re: [sqlite] Multi-column index is not used with IN operator

2012-12-14 Thread Selen Schabenberger
From: Hick Gunter <h...@scigames.at> To: 'Selen Schabenberger' <selen_oz...@yahoo.com>; 'General Discussion of SQLite Database' <sqlite-users@sqlite.org> Sent: Friday, December 14, 2012 3:26 PM Subject: AW: [sqlite] Multi-column index is not used with IN oper

Re: [sqlite] Multi-column index is not used with IN operator

2012-12-14 Thread Selen Schabenberger
till chooses the primary key on the Id column. -Selen From: Richard Hipp <d...@sqlite.org> To: Selen Schabenberger <selen_oz...@yahoo.com>; General Discussion of SQLite Database <sqlite-users@sqlite.org>  Sent: Friday, December 14, 2012 3:09 PM Subject: Re: [sqlite] Multi-co

[sqlite] Multi-column index is not used with IN operator

2012-12-14 Thread Selen Schabenberger
Hi All, I am observing some strange behaviour on my database when I execute a query with an IN operator having more than "22" expressions. My table structure looks basically as follows: CREATE TABLE "Messages" ("Id" INTEGER PRIMARY KEY NOT NULL, "Tag" INTEGER NOT NULL, "Flag" INTEGER ) I