Re: [sqlite] DB managers that do searches?

2007-10-30 Thread Bernie Cosell
On 30 Oct 2007 at 23:31, Kees Nuyt wrote: > [Default] On Tue, 30 Oct 2007 16:57:55 -0400, "Bernie Cosell" > <[EMAIL PROTECTED]> wrote: > > >I'm trying to correct several little problems in a DB I have and I've > >now tried three [maybe four] freeware DB managers and not one includes > >a

RE: [sqlite] DB managers that do searches?

2007-10-30 Thread Bernie Cosell
On 30 Oct 2007 at 14:05, James Dennett wrote: > > -Original Message- > > From: Bernie Cosell [mailto:[EMAIL PROTECTED] > > I'm trying to correct several little problems in a DB I have and I've > > now tried three [maybe four] freeware DB managers and not one includes > > a search

Re: [sqlite] DB managers that do searches?

2007-10-30 Thread Bernie Cosell
On 30 Oct 2007 at 14:27, Trevor Talbot wrote: > To help the conversation along a bit, phpMyAdmin is a web-based > administrative and design interface for MySQL. I don't use it so I > don't know exactly what kind of searching the OP is looking for > either, but at least we know the type of tool

RE: [sqlite] Proposed sqlite3_initialize() interface

2007-10-30 Thread Virgilio Alexandre Fornazin
gcc support this, msvc++ and other compilers does not. -Original Message- From: Russell Leighton [mailto:[EMAIL PROTECTED] Sent: terça-feira, 30 de outubro de 2007 23:32 To: sqlite-users@sqlite.org Subject: Re: [sqlite] Proposed sqlite3_initialize() interface On Oct 30, 2007, at 10:18

Re: [sqlite] Proposed sqlite3_initialize() interface

2007-10-30 Thread Russell Leighton
On Oct 30, 2007, at 10:18 AM, [EMAIL PROTECTED] wrote: To accomodate this need, we are considering an incompatible API change to SQLite. We are thinking of requiring that an application invoke: int sqlite3_initialize(...); I am not sure about the systems that you are trying to

Re: [sqlite] DB managers that do searches?

2007-10-30 Thread Gerry Snyder
Bernie Cosell wrote: I'm trying to correct several little problems in a DB I have and I've now tried three [maybe four] freeware DB managers and not one includes a search function. Do you mean sorting a table on a text column, typing in a few characters, and then going to the row that

Re: [sqlite] DB managers that do searches?

2007-10-30 Thread Kees Nuyt
[Default] On Tue, 30 Oct 2007 16:57:55 -0400, "Bernie Cosell" <[EMAIL PROTECTED]> wrote: >I'm trying to correct several little problems in a DB I have and I've >now tried three [maybe four] freeware DB managers and not one includes >a search function. I have a table with 800+ rows and I'd like

Re: [sqlite] Retrieve bound host parameters from statement?

2007-10-30 Thread Kees Nuyt
On Tue, 30 Oct 2007 17:28:35 +0700, Dan Kennedy <[EMAIL PROTECTED]> wrote: >... >Say you want to query statement object >X that has 4 variables, you could do this: > > pTmp = sqlite3_prepare("SELECT ?, ?, ?, ?"); > sqlite3_transfer_bindings(X, pTmp); > /* Use sqlite3_step() etc. to fish values

Re: [sqlite] Proposed sqlite3_initialize() interface

2007-10-30 Thread Kees Nuyt
On Tue, 30 Oct 2007 14:18:48 +, [EMAIL PROTECTED] wrote: >To accomodate this need, we are considering an incompatible >API change to SQLite. We are thinking of requiring that an >application invoke: > >int sqlite3_initialize(...); > >prior to using any other SQLite interface. In my

Re: [sqlite] Proposed sqlite3_initialize() interface

2007-10-30 Thread Richard Klein
[EMAIL PROTECTED] wrote: But there are other operating systems using SQLite that do not work this way. They need a way to initialize mutexes (and possibly other objects such as malloc) prior to running any SQLite interface. And the initialization needs to be able to fail and return an error

RE: [sqlite] Your Concurrency Idea

2007-10-30 Thread Ken
Dan, The journal file contains the "before" image of a modified database block not the after image. during write operations: before images are written to the journal file for recovery. Then the actual change is written to the .db file. A commit is an atomic operation due to unlinking the

Re: [sqlite] Retrieve bound host parameters from statement?

2007-10-30 Thread Joe Wilson
--- Dennis Cote <[EMAIL PROTECTED]> wrote: > Joe Wilson wrote: > > The transferred bindings are still opaque, aren't they? > > > > --- Dan Kennedy <[EMAIL PROTECTED]> wrote: > > > >> Depends how desperate you are. Say you want to query statement > >> object X that has 4 variables, you could do

Re: [sqlite] Soft heap limit enforcement performance

2007-10-30 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > Joe Wilson <[EMAIL PROTECTED]> wrote: > > Is this memory pooling going to be compile-time optional? > > > > I find that library-specific memory pools are awkward because each > > library tends to have its own schemes that don't play well with each > > other. If you

Re: [sqlite] Retrieve bound host parameters from statement?

2007-10-30 Thread Dennis Cote
Joe Wilson wrote: The transferred bindings are still opaque, aren't they? --- Dan Kennedy <[EMAIL PROTECTED]> wrote: Depends how desperate you are. Say you want to query statement object X that has 4 variables, you could do this: pTmp = sqlite3_prepare("SELECT ?, ?, ?, ?");

Re: [sqlite] DB managers that do searches?

2007-10-30 Thread Trevor Talbot
To help the conversation along a bit, phpMyAdmin is a web-based administrative and design interface for MySQL. I don't use it so I don't know exactly what kind of searching the OP is looking for either, but at least we know the type of tool :)

Re: [sqlite] Proposed sqlite3_initialize() interface

2007-10-30 Thread Trevor Talbot
I wrote: > On 10/30/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > On win32, we have to initialize mutexes at run-time, but this > > can be done within a contrived mutex that we build off of > > a static integer using InterlockedIncrement(). And mutex > > initialization apparently never

RE: [sqlite] DB managers that do searches?

2007-10-30 Thread Griggs, Donald
Hi Bernie, regarding: "...and not having a search is a real hassle" I'm not at all sure I understand. SQLITE (and all the DB managers I know of that incorporate it) supports most of the SQL 92 language, which allows rather sophisticated searching via the SELECT statement. It's not normally the

RE: [sqlite] DB managers that do searches?

2007-10-30 Thread James Dennett
> -Original Message- > From: Bernie Cosell [mailto:[EMAIL PROTECTED] > Sent: Tuesday, October 30, 2007 1:58 PM > To: sqlite-users@sqlite.org > Subject: [sqlite] DB managers that do searches? > > I'm trying to correct several little problems in a DB I have and I've > now tried three [maybe

[sqlite] DB managers that do searches?

2007-10-30 Thread Bernie Cosell
I'm trying to correct several little problems in a DB I have and I've now tried three [maybe four] freeware DB managers and not one includes a search function. I have a table with 800+ rows and I'd like to find particular records so I can edit them, and not having a search is proving to be a

Re: [sqlite] Soft heap limit enforcement performance

2007-10-30 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > Joe Wilson <[EMAIL PROTECTED]> wrote: > > --- [EMAIL PROTECTED] wrote: > > > Mostly I am interested in making sure that malloc(1000) does not > > > fail even though you have 5 bytes free and they just happen > > > to be scattered about as 100 discontinguous

Re: [sqlite] Proposed sqlite3_initialize() interface

2007-10-30 Thread Trevor Talbot
On 10/30/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > On win32, we have to initialize mutexes at run-time, but this > can be done within a contrived mutex that we build off of > a static integer using InterlockedIncrement(). And mutex > initialization apparently never fails on win32, so we

RE: [sqlite] Your Concurrency Idea

2007-10-30 Thread Dan Petitt
The journal file sounds like the wrong place to put it, the journal seems to be the place to store information that needs writing to the database on completion; storing some read-only information in the same file seems at odds with its current purpose. Perhaps a separate file(s) might be more

Re: [sqlite] Soft heap limit enforcement performance

2007-10-30 Thread Eduardo Morras
At 19:41 30/10/2007, you wrote: Mostly I am interested in making sure that malloc(1000) does not fail even though you have 5 bytes free and they just happen to be scattered about as 100 discontinguous blocks of 500 bytes each. On the embebed device i worked (i made only the micro-os with

Re: [sqlite] Soft heap limit enforcement performance

2007-10-30 Thread drh
Joe Wilson <[EMAIL PROTECTED]> wrote: > --- [EMAIL PROTECTED] wrote: > > Mostly I am interested in making sure that malloc(1000) does not > > fail even though you have 5 bytes free and they just happen > > to be scattered about as 100 discontinguous blocks of 500 bytes > > each. > > It's a

RE: Re[4]: [sqlite] Proposed sqlite3_initialize() interface

2007-10-30 Thread James Dennett
[EMAIL PROTECTED] wrote: > > Hello Joe, > > Tuesday, October 30, 2007, 2:08:55 PM, you wrote: > > JW> --- Teg <[EMAIL PROTECTED]> wrote: > >> You'll just end up exchanging an "are you initialized" flag for a "have > >> you called the initialization routine" flag. I don't see it changing > >>

Re: Re[4]: [sqlite] Proposed sqlite3_initialize() interface

2007-10-30 Thread Joe Wilson
--- Teg <[EMAIL PROTECTED]> wrote: > I was speaking of internally, inside SQlite. I'm sure you expect to > get an error if you call into SQLite without calling the initialize > routine first. Instead of returning an error, why not initialize right there > instead? Because of the overhead in the

Re: [sqlite] Soft heap limit enforcement performance

2007-10-30 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > Mostly I am interested in making sure that malloc(1000) does not > fail even though you have 5 bytes free and they just happen > to be scattered about as 100 discontinguous blocks of 500 bytes > each. It's a good goal. You can reduce the likelihood of failure

Re: [sqlite] Your Concurrency Idea

2007-10-30 Thread Ken
DRH, I seemed to recall posting that ticket. I don't have any good solutions for the txn journal lookup at the moment. Maybe a form of block chaining from the sourcing DB to the txn journal offset. Each txn journal modification would point to the prior versions offset. So that multiple

Re[4]: [sqlite] Proposed sqlite3_initialize() interface

2007-10-30 Thread Teg
Hello Joe, Tuesday, October 30, 2007, 2:08:55 PM, you wrote: JW> --- Teg <[EMAIL PROTECTED]> wrote: >> You'll just end up exchanging an "are you initialized" flag for a "have >> you called the initialization routine" flag. I don't see it changing >> the size or complexity. Either way, SQLite

RE: [sqlite] Proposed sqlite3_initialize() interface

2007-10-30 Thread James Dennett
Roger Binns wrote: > [EMAIL PROTECTED] wrote: > > It is also an error to > > invoke sqlite3_initialize() more than once. > > That is a pretty nasty restriction to have. If you link multiple other > libraries into your program, each of which also uses SQLite then you'd > somehow have to arrange

Re: [sqlite] Soft heap limit enforcement performance

2007-10-30 Thread drh
Joe Wilson <[EMAIL PROTECTED]> wrote: > --- [EMAIL PROTECTED] wrote: > > Joe Wilson <[EMAIL PROTECTED]> wrote: > > > The only real way to prevent allocation fragmentation is to move > > > blocks of memory around - > > > > Not true. You can prevent fragmentation, for example, by > > not

Re: [sqlite] Soft heap limit enforcement performance

2007-10-30 Thread John Stanton
[EMAIL PROTECTED] wrote: Joe Wilson <[EMAIL PROTECTED]> wrote: The only real way to prevent allocation fragmentation is to move blocks of memory around - Not true. You can prevent fragmentation, for example, by not allocating objects beside each other that will be destroyed at different

Re: Re[2]: [sqlite] Proposed sqlite3_initialize() interface

2007-10-30 Thread Joe Wilson
--- Teg <[EMAIL PROTECTED]> wrote: > You'll just end up exchanging an "are you initialized" flag for a "have > you called the initialization routine" flag. I don't see it changing > the size or complexity. Either way, SQLite either has to ensure it's > initialized OR that someone has called the

Re: [sqlite] Soft heap limit enforcement performance

2007-10-30 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > Joe Wilson <[EMAIL PROTECTED]> wrote: > > The only real way to prevent allocation fragmentation is to move > > blocks of memory around - > > Not true. You can prevent fragmentation, for example, by > not allocating objects beside each other that will be destroyed >

Re: [sqlite] Your Concurrency Idea

2007-10-30 Thread drh
"Dan Petitt" <[EMAIL PROTECTED]> wrote: > Richard, i noticed this ticket in the system: > http://www.sqlite.org/cvstrac/tktview?tn=2417,8 > > And wondered if its something that is getting any serious thought or > something that is just a faint possibility? > Seems to be an incompatibly file

Re: [sqlite] Proposed sqlite3_initialize() interface

2007-10-30 Thread Mark Spiegel
Dr. Hipp, On the fly initialization is a big concern for me because I have the misfortune to live in a massively multi-threaded environment. So I am very much in favor of this change. I see that there are already some other proposals out there, but would urge you to make the interface

Re[2]: [sqlite] Proposed sqlite3_initialize() interface

2007-10-30 Thread Teg
Hello Joe, Tuesday, October 30, 2007, 12:01:37 PM, you wrote: JW> I think the proposed sqlite3_initialize() is a good idea and the JW> library might be a bit smaller/faster as well due to removal of JW> initialization checks in various functions. JW> Any concern about operating systems that

[sqlite] Your Concurrency Idea

2007-10-30 Thread Dan Petitt
Richard, i noticed this ticket in the system: http://www.sqlite.org/cvstrac/tktview?tn=2417,8 And wondered if its something that is getting any serious thought or something that is just a faint possibility? - To

Re: [sqlite] Proposed sqlite3_initialize() interface

2007-10-30 Thread Scott Hess
On Oct 30, 2007 7:18 AM, <[EMAIL PROTECTED]> wrote: > This is still just an idea. If you think that adding a new > required sqlite3_initialize() interface would cause serious > hardship for your use of SQLite, please speak up now. I think this would cause some hardship for dynamically-loaded

Re: [sqlite] Proposed sqlite3_initialize() interface

2007-10-30 Thread drh
"Dan Petitt" <[EMAIL PROTECTED]> wrote: > > Alternatively, you don't actually need the interface for > > 99.99% of users out there (Windows, Linux, Mac) so you > > could make it unnecessary for them, but do require it for the > > various esoteric embedded systems. That would justify still > >

Re: [sqlite] Soft heap limit enforcement performance

2007-10-30 Thread drh
Joe Wilson <[EMAIL PROTECTED]> wrote: > The only real way to prevent allocation fragmentation is to move > blocks of memory around - Not true. You can prevent fragmentation, for example, by not allocating objects beside each other that will be destroyed at different times. Or, you can pick a

Re: [sqlite] Proposed sqlite3_initialize() interface

2007-10-30 Thread Joe Wilson
--- Marco Bambini <[EMAIL PROTECTED]> wrote: > I think that sqlite3_initialize should be allowed to be called more > than once. > With the help of a static flag, only the first time it is executed > the proper initialize functions will be invoked, successive calls to > the sqlite3_initialize

Re: [sqlite] Proposed sqlite3_initialize() interface

2007-10-30 Thread John Stanton
I would endorse the use of an initialization functions as being clean and efficient and one of the simplest and most logical of optimizations, eliminating common expressions. Since your typical application program has an initialization phase it is trivial to add the new API function to legacy

Re: [sqlite] Retrieve bound host parameters from statement?

2007-10-30 Thread Joe Wilson
The transferred bindings are still opaque, aren't they? --- Dan Kennedy <[EMAIL PROTECTED]> wrote: > Depends how desperate you are. Say you want to query statement > object X that has 4 variables, you could do this: > > pTmp = sqlite3_prepare("SELECT ?, ?, ?, ?"); >

RE: [sqlite] Proposed sqlite3_initialize() interface

2007-10-30 Thread Dan Petitt
> Alternatively, you don't actually need the interface for 99.99% of users out there (Windows, Linux, Mac) > so you could make it unnecessary for them, but do require it for the various esoteric embedded systems. > That would justify still calling it SQLite version 3. That was my first thought,

Re: [sqlite] Proposed sqlite3_initialize() interface

2007-10-30 Thread Marco Bambini
I think that sqlite3_initialize should be allowed to be called more than once. With the help of a static flag, only the first time it is executed the proper initialize functions will be invoked, successive calls to the sqlite3_initialize should just be a NOP operation... --- Marco Bambini

Re: [sqlite] Soft heap limit enforcement performance

2007-10-30 Thread Joe Wilson
The only real way to prevent allocation fragmentation is to move blocks of memory around - i.e., return and manilpulate handles to pointers instead of the pointers themselves. But this adds a lot of runtime overhead and is not C friendly. Anything else is just a compromise. Predictive and

Re: [sqlite] Strange error in sqlite 3.4.2 Win32 version

2007-10-30 Thread drh
Marco Bambini <[EMAIL PROTECTED]> wrote: > > I am experiencing a very strange issue in sqlite 3.4.2 (only with the > Win32 version, OSX and linux works fine). > > I wonder if there was a bug in the 3.4.2 version that I should fix... > Please note that I cannot upgrade to the latest 3.5.x

Re: [sqlite] Proposed sqlite3_initialize() interface

2007-10-30 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] wrote: > It is also an error to > invoke sqlite3_initialize() more than once. That is a pretty nasty restriction to have. If you link multiple other libraries into your program, each of which also uses SQLite then you'd somehow

Re: [sqlite] Proposed sqlite3_initialize() interface

2007-10-30 Thread Kon Lovett
On Oct 30, 2007, at 7:18 AM, [EMAIL PROTECTED] wrote: As currently implemented, SQLite3 requires no initialization. You just start calling SQLite3 interfaces and they work. We can pull off this trick on Unix because pthread mutexes can be initialized statically at compile-time. static

[sqlite] Strange error in sqlite 3.4.2 Win32 version

2007-10-30 Thread Marco Bambini
Hi guys, I am experiencing a very strange issue in sqlite 3.4.2 (only with the Win32 version, OSX and linux works fine). Here it is what's happen: // create table CREATE TABLE One( a varchar primary key, b1 integer, b2 integer, b3 integer, z varchar ) CREATE UNIQUE INDEX idx_One ON One(

Re: [sqlite] Proposed sqlite3_initialize() interface

2007-10-30 Thread Joe Wilson
I think the proposed sqlite3_initialize() is a good idea and the library might be a bit smaller/faster as well due to removal of initialization checks in various functions. Any concern about operating systems that already ship with a shared sqlite3 library? Or is that what shared library

Re: [sqlite] Soft heap limit enforcement performance

2007-10-30 Thread drh
Joe Wilson <[EMAIL PROTECTED]> wrote: > Hi Richard, > > This might be worth a read. This paper discusses limitations of custom > memory allocators: > > Reconsidering Custom Memory Allocation > http://www.cs.umass.edu/~emery/pubs/berger-oopsla2002.pdf > Interesting paper. Thanks for the

Re: [sqlite] libsqlite3.so.0 not found

2007-10-30 Thread dsb
> $ ldconfig -v > search for libsqlite3.so.0 in the list.. is it available Thanks. It's in /usr/local/lib, and the sqlite3 interface is working now. It didn't create the .db file when I exited though. Is it supposed to create an empty file, or do I have to add data first? > are you running a

Re: [sqlite] Soft heap limit enforcement performance

2007-10-30 Thread Joe Wilson
Hi Richard, This might be worth a read. This paper discusses limitations of custom memory allocators: Reconsidering Custom Memory Allocation http://www.cs.umass.edu/~emery/pubs/berger-oopsla2002.pdf This post by Emery Berger outlines the problems with Apache Portable Runtime (APR) memory

Re: [sqlite] Memory Management

2007-10-30 Thread drh
Ken <[EMAIL PROTECTED]> wrote: > DRH, > > I looked at the memory management code mem3.c. I noticed a > mutex to protect allocations/deallocations and was wondering > what the impact on performance to a multi threaded DB > applicaiton would be? I guess that depends on your mutex

Re: [sqlite] Proposed sqlite3_initialize() interface

2007-10-30 Thread drh
"Robert Simpson" <[EMAIL PROTECTED]> wrote: > > Is there a reason this can't be checked/done in sqlit3_open() via an > InterlockedCompareExchange() operation on the static integer, and if the > mutexes don't exist and can't be created, you just return a different error > code? > That's the

Re: [sqlite] INSERT OR IGNORE and sqlite3_last_insert_rowid()

2007-10-30 Thread Daniel Önnerby
Sorry, I didn't read the whole story before answering. You are right, the documentation on sqlite3_last_insert_rowid should contain some comment about the conflicts. I guess that, after working with SQLite for a long time, obvious things are not obvious to everyone and are easily forgotten in

[sqlite] Memory Management

2007-10-30 Thread Ken
DRH, I looked at the memory management code mem3.c. I noticed a mutex to protect allocations/deallocations and was wondering what the impact on performance to a multi threaded DB applicaiton would be? Other memory allcation schemes seem to allow each thread to manage memory independently of

RE: [sqlite] Proposed sqlite3_initialize() interface

2007-10-30 Thread Robert Simpson
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Tuesday, October 30, 2007 7:19 AM > To: sqlite-users@sqlite.org > Subject: [sqlite] Proposed sqlite3_initialize() interface > > As currently implemented, SQLite3 requires no initialization. > You just start

Re: [sqlite] Proposed sqlite3_initialize() interface

2007-10-30 Thread Virgilio Fornazin
I always create and XXX_Initialize() (and also XXX_Finalize() for resources cleanup) in all libraries I created, because: - You can perform initializations that cannot be done at compile time; - You can create your internal structures in the required order (C++ has the problem of initialization

[sqlite] Proposed sqlite3_initialize() interface

2007-10-30 Thread drh
As currently implemented, SQLite3 requires no initialization. You just start calling SQLite3 interfaces and they work. We can pull off this trick on Unix because pthread mutexes can be initialized statically at compile-time. static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; On win32,

RE: [sqlite] INSERT OR IGNORE and sqlite3_last_insert_rowid()

2007-10-30 Thread Michael Ruck
Daniel, My usecase is the following: I maintain a lot of tables, which are simply catalogs of predefined or user entered values. I wanted to reduce the amount of code and memory to maintain those tables, as the user can enter values as free text in a lot of web forms and also choose from

Re: [sqlite] Soft heap limit enforcement performance

2007-10-30 Thread drh
patters <[EMAIL PROTECTED]> wrote: > We rely on the SQLite memory management to enforce the memory usage in our > application (running on Windows CE). This has worked quite well for us, but > have found that when we hit the limit, in some circumstances, performance > drops significantly. > >

Re: [sqlite] Retrieve bound host parameters from statement?

2007-10-30 Thread Ralf Junker
Hello Joe Wilson, >> True, but we would need to access unsupported API to do so. And as we know >> only too well, >> unsupported API is subject to change without notice any time ;-). Therefore >> I would rather not >> write these myself but ask for the possibility to add them to the library >>

Re: [sqlite] Retrieve bound host parameters from statement?

2007-10-30 Thread Ralf Junker
Hello Dan Kennedy, >> True, but we would need to access unsupported API to do so. >> And as we know only too well, unsupported API is subject to >> change without notice any time ;-). Therefore I would rather >> not write these myself but ask for the possibility to add them >> to the library

Re: [sqlite] libsqlite3.so.0 not found

2007-10-30 Thread Filip Jonckers
if you do $ ldconfig -v or $ ldconfig -v | grep libsqlite3 search for libsqlite3.so.0 in the list..  is it available are you running a 64bit OS version? if yes - depending on the client app - you need the 32bit version if client app is 32bit Filip [EMAIL PROTECTED] wrote: - To:

Re: [sqlite] Aggregate function as column

2007-10-30 Thread Brad Stiles
> SELECT number, name, (SELECT COUNT(*) FROM pet WHERE employee.number = > pet.number) AS pets FROM employee That seems like it should work, provided the tables have the definitions implied by the query. What error are you getting? Or you could try something like this completely

[sqlite] Soft heap limit enforcement performance

2007-10-30 Thread patters
We rely on the SQLite memory management to enforce the memory usage in our application (running on Windows CE). This has worked quite well for us, but have found that when we hit the limit, in some circumstances, performance drops significantly. Looking into the internals of SQLite, it seems

Re: [sqlite] Aggregate function as column

2007-10-30 Thread drh
"james stuart" <[EMAIL PROTECTED]> wrote: > I'm hope somebody can help me get unstuck here - > > I'm trying to use an aggregate function in a select statement but it appears > that you can't use one as a column - > > SELECT number, name, (SELECT COUNT(*) FROM pet WHERE employee.number = >

[sqlite] Aggregate function as column

2007-10-30 Thread james stuart
I'm hope somebody can help me get unstuck here - I'm trying to use an aggregate function in a select statement but it appears that you can't use one as a column - SELECT number, name, (SELECT COUNT(*) FROM pet WHERE employee.number = pet.number) AS pets FROM employee I can't come up with

[sqlite] libsqlite3.so.0 not found

2007-10-30 Thread dsb
I downloaded the source tarball for 3.5.1 and followed the instructions in README. The build dir is sqlite-3.5.1/../bld. Then cd'd into a subdir of ~ and tried to create a db: $ sqlite3 mysite.db sqlite3: error while loading shared libraries: libsqlite3.so.0: cannot open shared object file: No

[sqlite] left join usage and performance

2007-10-30 Thread Filip Jonckers
First of all I must say that I enjoyed reading your presentation at http://www.sqlite.org/php2004/page-001.html on the internals of SQLite and the performance tips. I could not find any information on the processing of LEFT JOIN queries though... As SQLite only does loop-joins, I wonder how I

Re: AW: [sqlite] INSERT OR IGNORE and sqlite3_last_insert_rowid()

2007-10-30 Thread Daniel Önnerby
Why are you using the INSERT OR IGNORE? If you read the http://www.sqlite.org/lang_conflict.html it states that the IGNORE will not return any errors. Isn't the default behavior INSERT OR ABORT (or just plain INSERT) what you are looking for? The default INSERT will return an error

Re: [sqlite] Retrieve bound host parameters from statement?

2007-10-30 Thread Dan Kennedy
On Mon, 2007-10-29 at 17:49 +0100, Ralf Junker wrote: > >> I wonder if it is possible to retrieve bound host parameters from a > >> prepared SQL statement? I am > >> thinking of the opposite of the sqlite3_bind... family of functions like: > >> > >> int sqlite3_bound_int (sqlite3_stmt*, int*);

[sqlite] database lock error

2007-10-30 Thread Maxim V. Shiyanovsky
I've already posted here question about getting SQLITE_BUSY when calling sqlite3_prepare in single thread application dependent on database size. Now I get more detailed diagnostic. I have simple database but with considerable amount of records in some tables. Sql commands looks like: Begin

AW: [sqlite] INSERT OR IGNORE and sqlite3_last_insert_rowid()

2007-10-30 Thread Michael Ruck
I'm not blaming anyone. I just think it should be mentioned in the docs. Mike -Ursprüngliche Nachricht- Von: John Stanton [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 29. November 2007 20:12 An: sqlite-users@sqlite.org Betreff: Re: [sqlite] INSERT OR IGNORE and

[sqlite] db4o 500x faster than sqlite?

2007-10-30 Thread gerpux
Hi! I've heard that the guys at db4o said that, under certain circunstances, db4o is 500x faster than sqlite: Is this because of the jdbc driver? What would be a more realistic measure? (db4o is an object database, not a relational one) They are using the poleposition benchmark