[sqlite] subquery performance

2014-03-19 Thread Sander Jansen
Hi, Given the following two tables: TABLE tracks ... composer REFERENCES artists(id) conductor REFERENCES artists(id) performer REFERENCES artists(id) TABLE artists id name I'm trying efficiently to find a list of tracks given the name of an artist (used in composer or conductor or performer).

Re: [sqlite] Serialized + Prepared Statement Clarification

2012-05-23 Thread Sander Jansen
On Wed, May 23, 2012 at 1:05 PM, Igor Tandetnik <itandet...@mvps.org> wrote: > On 5/23/2012 1:51 PM, Sander Jansen wrote: >> >> I was always under the impression that prepared statements can only be >> used from one thread at a time, so if 2 threads need to perform the

[sqlite] Serialized + Prepared Statement Clarification

2012-05-23 Thread Sander Jansen
Hi, I was always under the impression that prepared statements can only be used from one thread at a time, so if 2 threads need to perform the same query independently, you need to have a prepared statement for each thread. Now I came across the following which seems to contradict this: "

Re: [sqlite] Retrieving NANs

2009-01-09 Thread Sander Jansen
On Thu, Jan 8, 2009 at 7:03 PM, Gerry Snyder <mesmerizer...@gmail.com> wrote: > Sander Jansen wrote: >> I need to store NaNs in my database and able to retrieve them as well. >> >> Since sqlite will give me back 0.0 when I call sqlite3_column_double >>

[sqlite] Retrieving NANs

2009-01-08 Thread Sander Jansen
I need to store NaNs in my database and able to retrieve them as well. Since sqlite will give me back 0.0 when I call sqlite3_column_double and a result contains a NAN, I was wondering what the best way is to retrieve a NAN from the database. Here's what I currently do in peudo code: if

Re: [sqlite] IN expression performance

2008-12-19 Thread Sander Jansen
On Thu, Dec 18, 2008 at 7:44 PM, Griggs, Donald wrote: > Regarding: > Is there a way to use a prepared statement and bind a (variable) > array of integers? > >Like in: >SELECT FROM table WHERE someinteger IN ( 2,18,19,340,1,72, 15 > ... ) > >

Re: [sqlite] IN expression performance

2008-12-18 Thread Sander Jansen
:16 PM, Igor Tandetnik <itandet...@mvps.org> wrote: > Sander Jansen <s.jan...@gmail.com> wrote: >> Suppose I have query that does: >> >> SELECT FROM table WHERE someinteger IN ( 2,18,19,340,1,72, 15 >> ); >> >> The list of numbers comes fro

Re: [sqlite] IN expression performance

2008-12-18 Thread Sander Jansen
thanks! On Mon, Dec 15, 2008 at 4:16 PM, Igor Tandetnik <itandet...@mvps.org> wrote: > Sander Jansen <s.jan...@gmail.com> wrote: >> Suppose I have query that does: >> >> SELECT FROM table WHERE someinteger IN ( 2,18,19,340,1,72, 15 >> ); >

Re: [sqlite] sqlite_prepare returns SQLITE_OK but returns NULL statement

2007-03-01 Thread Sander Jansen
. Sander On 3/1/07, Dennis Cote <[EMAIL PROTECTED]> wrote: Sander Jansen wrote: > Using SqLite 3.3.3 I'm trying to prepare the following statement: > > "CREATE INDEX IF NOT EXISTS someindexname ON sometable(somecolumn);" > > It returns SQLITE_OK but returns a NU

[sqlite] sqlite_prepare returns SQLITE_OK but returns NULL statement

2007-03-01 Thread Sander Jansen
Using SqLite 3.3.3 I'm trying to prepare the following statement: "CREATE INDEX IF NOT EXISTS someindexname ON sometable(somecolumn);" It returns SQLITE_OK but returns a NULL statement. ( I think a newer version doesn't have this behaviour). Does this actually mean that it is a unsupported SQL