Re: [sqlite] Automatic index detail

2010-09-15 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/15/2010 08:58 PM, Cory Nelson wrote: > This might not be doing what you think it is. It does exactly what I think it does and as is documented. > When you have a query that will do a full table scan multiple times, > SQLite can sometimes

Re: [sqlite] Automatic index detail

2010-09-15 Thread Drake Wilson
Quoth Cory Nelson , on 2010-09-15 20:58:24 -0700: > It sounds like you already know which columns will be queried against. > You should probably be creating permanent indexes. I'm pretty sure his question was asking whether he could verify the set of relevant columns

Re: [sqlite] Automatic index detail

2010-09-15 Thread Cory Nelson
On Wed, Sep 15, 2010 at 8:25 PM, Roger Binns wrote: > On 09/15/2010 06:00 PM, Cory Nelson wrote: >> SQLite doesn't support automatic indexing, > > And your basis for that claim is? > This might not be doing what you think it is. When you have a query that will do a full

Re: [sqlite] Automatic index detail

2010-09-15 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/15/2010 06:00 PM, Cory Nelson wrote: > SQLite doesn't support automatic indexing, And your basis for that claim is? The basis of mine is that it did for me. And this page: http://www.sqlite.org/optoverview.html#autoindex And these

Re: [sqlite] SQL Logic error for in-memory database

2010-09-15 Thread Hemant Shah
After executing sqlite3_step(), I check to see if the return code is SQLITE_OK if (rc != SQLITE_OK) { printf("%s\n", sqlite3_errmsg(dbhandle); } I will add sqlite3_reset() before calling sqlite3_errmsg(). Hemant Shah E-mail: hj...@yahoo.com --- On Wed, 9/15/10, Roger Binns

Re: [sqlite] Automatic index detail

2010-09-15 Thread Cory Nelson
On Wed, Sep 15, 2010 at 5:46 PM, Roger Binns wrote: > I've got a large third party data set I imported into SQLite.  Queries are > surprising fast especially since I haven't created any indices yet.  The > reason turned out to be because of the automatic index

Re: [sqlite] New to SQLite and I have a question

2010-09-15 Thread Mike Owens
FWIW, there is a second edition of the Definitive Guide to SQLite, apparently coming out in Nov: http://www.amazon.com/Definitive-Guide-SQLite-Mike-Owens/dp/1430232250/ Allen Grant is the author doing the work. I don't have any details other than that. I hear he's a good guy for the job though.

[sqlite] Automatic index detail

2010-09-15 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I've got a large third party data set I imported into SQLite. Queries are surprising fast especially since I haven't created any indices yet. The reason turned out to be because of the automatic index functionality. When doing an "explain query

Re: [sqlite] what could be the reason that natural join stops working ?

2010-09-15 Thread Stef Mientki
On 15-09-2010 20:12, Nicolas Williams wrote: > On Wed, Sep 15, 2010 at 08:05:26PM +0200, Stef Mientki wrote: >> On 15-09-2010 11:36, Benoit Mortgat wrote: >>> Are you sure that after altering your tables adding columns, natural >>> join still only joins on vlid? >>> >> no, very stupid of me !!

Re: [sqlite] SQL Logic error for in-memory database

2010-09-15 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/15/2010 11:53 AM, Hemant Shah wrote: > The error occurs while calling sqlite3_step(). Call sqlite3_reset and then get the error message text. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with

Re: [sqlite] SQL Logic error for in-memory database

2010-09-15 Thread Hemant Shah
The error occurs while calling sqlite3_step(). Hemant Shah E-mail: hj...@yahoo.com --- On Wed, 9/15/10, Roger Binns wrote: > From: Roger Binns > Subject: Re: [sqlite] SQL Logic error for in-memory database > To: "General Discussion of SQLite

Re: [sqlite] SQL Logic error for in-memory database

2010-09-15 Thread Hemant Shah
--- On Tue, 9/14/10, Simon Slavin wrote: > From: Simon Slavin > Subject: Re: [sqlite] SQL Logic error for in-memory database > To: "General Discussion of SQLite Database" > Date: Tuesday, September 14, 2010, 9:51 PM > > On

Re: [sqlite] what could be the reason that natural join stops working ?

2010-09-15 Thread Nicolas Williams
On Wed, Sep 15, 2010 at 08:05:26PM +0200, Stef Mientki wrote: > On 15-09-2010 11:36, Benoit Mortgat wrote: > > Are you sure that after altering your tables adding columns, natural > > join still only joins on vlid? > > > no, very stupid of me !! > I added a column to each of the tables, with the

Re: [sqlite] what could be the reason that natural join stops working ?

2010-09-15 Thread Stef Mientki
On 15-09-2010 11:36, Benoit Mortgat wrote: > On Tue, Sep 14, 2010 at 23:41, Stef Mientki wrote: > >> until a few moments ago, this worked perfectly >> >> select Header from vraag >> natural join vraaglist >> where Nr = 0 and vraaglist.Name = 'eortc_br23' >> >> but now

Re: [sqlite] what could be the reason that natural join stops working ?

2010-09-15 Thread Benoit Mortgat
On Tue, Sep 14, 2010 at 23:41, Stef Mientki wrote: > > until a few moments ago, this worked perfectly > > select Header from vraag > natural join vraaglist > where Nr = 0 and vraaglist.Name = 'eortc_br23' > > but now it returns an empty string (while the string

Re: [sqlite] DB file locked when no other process using it - Found word(s) list error in the Text body

2010-09-15 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/15/2010 01:43 AM, Nick Shaw wrote: > I assume sqlite should no longer have any handles > open to the database; however Windows (which I'm running under) may well > still have open handles to the file waiting to flush cached changes to > disk.

Re: [sqlite] DB file locked when no other process using it - Found word(s) list error in the Text body

2010-09-15 Thread Nick Shaw
I've seen this kind of issue before - after closing the sqlite3 database, I can't delete the file (I would want to do this if I opened an sqlite3 database and found it to be corrupt). As sqlite's connection handle has closed, I assume sqlite should no longer have any handles open to the database;

Re: [sqlite] what could be the reason that natural join stops working ?

2010-09-15 Thread Stef Mientki
On 15-09-2010 03:42, Pavel Ivanov wrote: > Did you by any chance introduced some unique constraint or unique > index on a set of columns one of which is primary key? AFAIK, there > was a problem in SQLite until some recent versions in processing of > redundant unique constraints in conjunction

Re: [sqlite] DB file locked when no other process using it

2010-09-15 Thread Benoit Mortgat
Do you have SQLite Manager extension for Firefox installed? I had problems with it having the database open until Firefox is restarted. On Tue, Sep 14, 2010 at 15:45, Andrew Wood wrote: > Im getting an error saying the database is locked even though no other > process is

Re: [sqlite] SQL Logic error for in-memory database

2010-09-15 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/14/2010 07:41 PM, Hemant Shah wrote: > Sometimes I get following error: > > SQL logic error or missing database. That text corresponds to the error code SQLITE_ERROR which is the code used for a wide variety of error conditions that don't have