Re: [sqlite] System.Data.SQLite version 1.0.89.0 released

2013-11-28 Thread Joe Mistachkin
Jan Slodicka wrote: > > bool exists; > exists = idxs.TryGetValue("Abc", out i);// true => ok > exists = idxs.TryGetValue("abc", out i);// false => BUG > Thanks, fixed on trunk. SQLiteDataReader now uses the built-in StringComparer class instead. -- Joe Mistachkin

Re: [sqlite] Need advice on using nested selects in JOIN statements as a logical 'AND'

2013-11-28 Thread Igor Tandetnik
On 11/28/2013 2:40 AM, Tristan Van Berkom wrote: I.e. is the statement logically the same ? Yes, I do believe that the two queries shown in your original post are logically equivalent. -- Igor Tandetnik ___ sqlite-users mailing list

Re: [sqlite] System.Data.SQLite version 1.0.89.0 released

2013-11-28 Thread Jan Slodicka
This looks like a bug (ColumnNameComparer is taken from SqliteDataReader 1.0.89): var idxs = new Dictionary(new ColumnNameComparer()); idxs.Add("Xyz", 1); idxs.Add("Abc", 2); bool exists; exists = idxs.TryGetValue("Abc", out i);// true => ok exists =

Re: [sqlite] Need advice on using nested selects in JOIN statements as a logical 'AND'

2013-11-28 Thread Tristan Van Berkom
On Thu, 2013-11-28 at 12:19 +, Simon Slavin wrote: > On 28 Nov 2013, at 11:22am, Tristan Van Berkom > wrote: > > > Yes, I definitely agree that on a conceptual level, I should not > > have to consider the pre-optimization of my own query before > > launching it. As

Re: [sqlite] Need advice on using nested selects in JOIN statements as a logical 'AND'

2013-11-28 Thread Simon Slavin
On 28 Nov 2013, at 11:22am, Tristan Van Berkom wrote: > Yes, I definitely agree that on a conceptual level, I should not > have to consider the pre-optimization of my own query before > launching it. As a functional language, I should only have to > describe the query

Re: [sqlite] Need advice on using nested selects in JOIN statements as a logical 'AND'

2013-11-28 Thread Tristan Van Berkom
On Thu, 2013-11-28 at 12:11 +0100, Clemens Ladisch wrote: > Tristan Van Berkom wrote: > > Are the JOIN statements equal to the logical AND statements, > > Yes. > Thank you. > > for all practical purposes ? > > If you drop all those superfluous LEFT OUTER and IS NOT NULL parts, > the database

Re: [sqlite] Need advice on using nested selects in JOIN statements as a logical 'AND'

2013-11-28 Thread Clemens Ladisch
Tristan Van Berkom wrote: > Are the JOIN statements equal to the logical AND statements, Yes. > for all practical purposes ? If you drop all those superfluous LEFT OUTER and IS NOT NULL parts, the database will be able to optimize the first query (the one without subqueries) better. Regards,

Re: [sqlite] Need advice on using nested selects in JOIN statements as a logical 'AND'

2013-11-28 Thread Tristan Van Berkom
On Thu, 2013-11-28 at 09:43 +0100, Clemens Ladisch wrote: > Tristan Van Berkom wrote: > > When using an INNER join, the engine does something like this: > > > > o Create a data set that is table_1 * table_2 * table_3 rows > > large > > > > o Run the constraints on what might be multiple

Re: [sqlite] Need advice on using nested selects in JOIN statements as a logical 'AND'

2013-11-28 Thread Clemens Ladisch
Tristan Van Berkom wrote: > When using an INNER join, the engine does something like this: > > o Create a data set that is table_1 * table_2 * table_3 rows > large > > o Run the constraints on what might be multiple matching rows > in the resulting huge data set (even if I nest the