Re: [sqlite] View bindings for a statement

2008-04-25 Thread Dennis Cote
Cole Tuininga wrote: > > (tangental question - is it enough to just keep rebinding to a query? > Or do I need to call sqlite3_clear_bindings every time?). There is no need to clear the bindings. If you don't clear the bindings you only need to rebind the values that changed. > The table > in

Re: [sqlite] View bindings for a statement

2008-04-25 Thread Cole Tuininga
On Fri, Apr 25, 2008 at 4:13 PM, P Kishor <[EMAIL PROTECTED]> wrote: > > On 4/25/08, Cole Tuininga <[EMAIL PROTECTED]> wrote: > Here is what I do in the Perl world for this problem -- > > # Create a string with the bound vars to write to a log > $sql = "SELECT col FROM table WHERE col = ''; >

Re: [sqlite] View bindings for a statement

2008-04-25 Thread P Kishor
On 4/25/08, Cole Tuininga <[EMAIL PROTECTED]> wrote: > Hi all - > > I'm trying sqlite for the first time and am having a small problem. > I'm using the C api. > > I've got a prepared select query that I keep binding new values to > (tangental question - is it enough to just keep rebinding to a

[sqlite] View bindings for a statement

2008-04-25 Thread Cole Tuininga
Hi all - I'm trying sqlite for the first time and am having a small problem. I'm using the C api. I've got a prepared select query that I keep binding new values to (tangental question - is it enough to just keep rebinding to a query? Or do I need to call sqlite3_clear_bindings every time?).

Re: [sqlite] Performance statistics?

2008-04-25 Thread Richard Klein
> Richard Klein wrote: >> Does SQLite have a mechanism, in addition to the >> ANALYZE statement, for recording and dumping >> performance statistics? >> > > What kind of performance statistics are you looking for? > > SQLiteSpy (see >

Re: [sqlite] Insert date

2008-04-25 Thread Federico Granata
On Linux I get SQLite version 3.5.6 Enter ".help" for instructions sqlite> CREATE TABLE Sighting ( ...> SightingIdinteger PRIMARY KEY AUTOINCREMENT NOT NULL, ...> SpeciesId integer, ...> LocationIdinteger, ...> SightingDate date, ...> Note nvarchar(100)

Re: [sqlite] Insert date

2008-04-25 Thread Simon Davies
2008/4/25 lrjanzen <[EMAIL PROTECTED]>: > > I have the following table ... > and the following insert > INSERT INTO Sighting (SpeciesID,LocationID,SightingDate,Note) > VALUES (3005,22,'2/26/2008','New Note') > > the insert works EXCEPT the date keeps coming in as NULL! What am I doing > wrong? > >

Re: [sqlite] Insert date

2008-04-25 Thread Scott Baker
Scott Baker wrote: > lrjanzen wrote: >> I have the following table >> CREATE TABLE Sighting ( >> SightingIdinteger PRIMARY KEY AUTOINCREMENT NOT NULL, >> SpeciesId integer, >> LocationIdinteger, >> SightingDate date, >> Note nvarchar(100) >> ); >> >> and the

Re: [sqlite] Insert date

2008-04-25 Thread Scott Baker
lrjanzen wrote: > I have the following table > CREATE TABLE Sighting ( > SightingIdinteger PRIMARY KEY AUTOINCREMENT NOT NULL, > SpeciesId integer, > LocationIdinteger, > SightingDate date, > Note nvarchar(100) > ); > > and the following insert > INSERT INTO

Re: [sqlite] Insert date

2008-04-25 Thread Emilio Platzer
try inserting year/month/day Emilio > > I have the following table > CREATE TABLE Sighting ( > SightingIdinteger PRIMARY KEY AUTOINCREMENT NOT NULL, > SpeciesId integer, > LocationIdinteger, > SightingDate date, > Note nvarchar(100) > ); > > and the following

[sqlite] Insert date

2008-04-25 Thread lrjanzen
I have the following table CREATE TABLE Sighting ( SightingIdinteger PRIMARY KEY AUTOINCREMENT NOT NULL, SpeciesId integer, LocationIdinteger, SightingDate date, Note nvarchar(100) ); and the following insert INSERT INTO Sighting

Re: [sqlite] Performance statistics?

2008-04-25 Thread Dennis Cote
Richard Klein wrote: > Does SQLite have a mechanism, in addition to the > ANALYZE statement, for recording and dumping > performance statistics? > What kind of performance statistics are you looking for? SQLiteSpy (see http://www.yunqa.de/delphi/doku.php/products/sqlitespy/index) measures the

Re: [sqlite] 3.5.8 alot slower than 3.5.7

2008-04-25 Thread Daniel Önnerby
Thank you! This helped. didn't find this before. Best regards Daniel Eric Minbiole wrote: >> This works great but when I upgraded from 3.5.7 to 3.5.8 the speed of >> this select went from 0.2s to around 1 minute. And 3.5.8 is stealing >> ALOT more memory. >> > > D. Richard Hipp had a very

Re: [sqlite] What is faster?

2008-04-25 Thread Federico Granata
If you are under linux you can use "time" command to execute sqlite with various query and see which one is faster. -- [image: Just A Little Bit Of Geekness] Le tre grandi virtù di un programmatore: pigrizia, impazienza e

Re: [sqlite] 3.5.8 alot slower than 3.5.7

2008-04-25 Thread Eric Minbiole
> This works great but when I upgraded from 3.5.7 to 3.5.8 the speed of > this select went from 0.2s to around 1 minute. And 3.5.8 is stealing > ALOT more memory. D. Richard Hipp had a very helpful work-around for this issue, by simply rearranging the terms of your join's ON clause. Take a

[sqlite] 3.5.8 alot slower than 3.5.7

2008-04-25 Thread Daniel Önnerby
Hi all! I have a db looking like this: http://onnerby.se/~daniel/mc2db.png and in my tracks table I have a column named sort_order1. When my application is running I try to optimize the database by doing a pretty massive SELECT to set this sort_order looking like this: SELECT t.id FROM tracks t

Re: [sqlite] Select by order Speed

2008-04-25 Thread Igor Tandetnik
"Mahalakshmi.m" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > My table has records as follows: > > Id Track > 1 zz > 2 aaa > 3 cc > 4 aaa > 5 aaa > 6 aaa > > 1st 2 records -> SELECT Id, Track FROM MUSIC ORDER BY Track LIMIT 2; > > Output: 2 aaa > 4 aaa > > Next 2->SELECT Id, Track

[sqlite] Recall: ODBC driver C source file includes a header which was not shipped

2008-04-25 Thread Abshagen, Martin RD-AS2
Hi, I realize I have to recall my question. It was my fascination about the "amalgamation" version of sqlite3 that made me think that even sqlite3odbc.c was an "amalgamation". I apologize, should have read README before complaining. Martin Abshagen

Re: [sqlite] Is it safe to ...

2008-04-25 Thread Alexander Batyrshin
On Mon, Mar 24, 2008 at 3:58 PM, <[EMAIL PROTECTED]> wrote: > "Alexander Batyrshin" <[EMAIL PROTECTED]> wrote: > > Hello, > > Is it safe to use this algorithm: > > > > open_db > > fork() > > sql_do() // both parent and child executes sql statements > > close_db > > > > I am not familiar

Re: [sqlite] ODBC driver C source file includes a header which was notshipped

2008-04-25 Thread Christian Werner
"Abshagen, Martin RD-AS2" wrote: > > Hi, > > am trying to use the Sqlite3 ODBC driver for C, provided by Christian Werner > (http://www.ch-werner.de/sqliteodbc/, product sqliteodbc-0.77-1.src.rpm). > If _WIN32 is defined, sqlite3odbc.c includes a "resource3.h" header file, > which is not

[sqlite] Select by order Speed

2008-04-25 Thread Mahalakshmi.m
My table has records as follows: Id Track 1 zz 2 aaa 3 cc 4 aaa 5 aaa 6 aaa 1st 2 records -> SELECT Id, Track FROM MUSIC ORDER BY Track LIMIT 2; Output: 2 aaa 4 aaa Next 2->SELECT Id, Track FROM MUSIC WHERE Track > aaa ORDER

[sqlite] ODBC driver C source file includes a header which was not shipped

2008-04-25 Thread Abshagen, Martin RD-AS2
Hi, am trying to use the Sqlite3 ODBC driver for C, provided by Christian Werner (http://www.ch-werner.de/sqliteodbc/, product sqliteodbc-0.77-1.src.rpm). If _WIN32 is defined, sqlite3odbc.c includes a "resource3.h" header file, which is not shipped with the version. How could I work around or