Re: [sqlite] the speed of embedded database engines, sqlite3 vs berkeley db, I'm confused

2009-04-23 Thread Marcus Grimm
in your test code I see that you open the sqlite DB each time you perform the single query. I guess it would be fair to open the sqlite DB only once outside your test loop. 2nd: You query against ID without an index, try either define an index on ID or change your table definition into "ID INTEGER

Re: [sqlite] the speed of embedded database engines, sqlite3 vs berkeley db, I'm confused

2009-04-23 Thread Eugene Wee
Hi, On Fri, Apr 24, 2009 at 11:35 AM, liubin liu <7101...@sina.com> wrote: > > our project is using sqlite3, but found that the speed is too slow. > I just tested the BerkeleyDB, and found that the speed is very fast. But I > knew the sqlite3 is fast enough. And so I'm confused. > I may be using

Re: [sqlite] the speed of embedded database engines, sqlite3 vs berkeley db, I'm confused

2009-04-23 Thread RaghavendraK 70574
sqlite has edge over BDB: 1) code readability is not as clean and clear as sqlite 2) forums not sure if they are responsive as sqlite 3) sqlite is stable and does not crash on-restarts, bdb make uses of mmap and its behaviour is undefined under diskful condition. get sigbus

[sqlite] run SQLite3 on Windows CE 6.0

2009-04-23 Thread yudiannlu
Hi: Any one can share the Visual Studio 2008 project file of SQLite3 shell program (SQLite3.exe run on Windows CE 6.0 on X86 platform). Thanks Lu ___ sqlite-users mailing list sqlite-users@sqlite.org

[sqlite] the speed of embedded database engines, sqlite3 vs berkeley db, I'm confused

2009-04-23 Thread liubin liu
our project is using sqlite3, but found that the speed is too slow. I just tested the BerkeleyDB, and found that the speed is very fast. But I knew the sqlite3 is fast enough. And so I'm confused. I may be using sqlite3 in wrong way? anyway, next is my test code. I'm glad to receive your

Re: [sqlite] Subject: Sqlite flushing from cache to disk

2009-04-23 Thread Peter ZhaoKai
Hi Aneesh, I collect some information(see below 3 steps to optimize mem use) to answer your questions. Step 1 ** PRAGMA temp_store ** Step 2 ** Incrment default cache size PRAGMA default_cache_size ** Step 3 ** PRAGMA synchronous ** Step 1 ** PRAGMA temp_store ** Temporary storage is where

Re: [sqlite] Validating a file is a SQLite DB

2009-04-23 Thread Tommy Ocel
Well, it's already done now. Not a big deal. But if I find any cross-platform problems with my stream reading, I'll try the open call and see if it's quick enough. Thx again. On 4/23/09 7:00 PM, "Mark Spiegel" wrote: I would use the sqlite3_open_V2() call. It won't

Re: [sqlite] Validating a file is a SQLite DB

2009-04-23 Thread Mark Spiegel
I would use the sqlite3_open_V2() call. It won't read read the whole database, just enough to get started, including the header. It will save you having to write and debug your own mechanism. Tommy Ocel wrote: > Hi, > > Other than using sqlite3_open_V2() with a SQLITE_OPEN_READONLY flag,

Re: [sqlite] Validating a file is a SQLite DB

2009-04-23 Thread Dave Brown
Unless they are encrypted using the encryption extension... On Thu, Apr 23, 2009 at 4:46 PM, Tommy Ocel wrote: > Great. Thanks for the tip. > > > On 4/23/09 4:24 PM, "Igor Tandetnik" wrote: > > Tommy Ocel wrote: > > Other than using

Re: [sqlite] Validating a file is a SQLite DB

2009-04-23 Thread Tommy Ocel
Great. Thanks for the tip. On 4/23/09 4:24 PM, "Igor Tandetnik" wrote: Tommy Ocel wrote: > Other than using sqlite3_open_V2() with a SQLITE_OPEN_READONLY flag, > which would fully load the database and be time-consuming, anybody > know of a quick way to

Re: [sqlite] Validating a file is a SQLite DB

2009-04-23 Thread John Machin
On 24/04/2009 9:20 AM, Tommy Ocel wrote: > Other than using sqlite3_open_V2() with a SQLITE_OPEN_READONLY flag, > which would fully load the database and be time-consuming, > anybody know of a quick way to verify that a file is > actually a SQLite3 database file?

Re: [sqlite] Creating procedures in sqlite

2009-04-23 Thread John Stanton
Sqlite does not have stored procedures, but does have functions. We iplemented Javascript as a stored procedure language in Sqlite and are currently looking at doing the same with Python for another application. You could also use Lua. These are all Open Source projects. Jyoti Seth wrote: >

Re: [sqlite] Validating a file is a SQLite DB

2009-04-23 Thread Igor Tandetnik
Tommy Ocel wrote: > Other than using sqlite3_open_V2() with a SQLITE_OPEN_READONLY flag, > which would fully load the database and be time-consuming, anybody > know of a quick way to verify that a file is actually a SQLite3 > database file? SQLite 3.* database files begin with

[sqlite] Validating a file is a SQLite DB

2009-04-23 Thread Tommy Ocel
Hi, Other than using sqlite3_open_V2() with a SQLITE_OPEN_READONLY flag, which would fully load the database and be time-consuming, anybody know of a quick way to verify that a file is actually a SQLite3 database file? (I'm reusing a file extension for an upgrade, so want to quickly test if

Re: [sqlite] Query takes ages

2009-04-23 Thread John Machin
On 24/04/2009 2:16 AM, Marco Bambini wrote: > I have a query that takes ages ... my app remains in the first > sqlite_step for more than 30 minutes (with 100% CPU time). > Query is: > > SELECT reseaux.name, reseaux.id_reseau, reseaux.insee_id, > panneaux.insee_id, > panneaux > .reseau_id

[sqlite] Solution for VxWorks problem when using file

2009-04-23 Thread Branko Zebec
Hi all, I try to build SQLite on VxWorks and it was ok. I make also create, insert, update, delete and select to :memory: and to file to /tffs file system and also to ramDisk. Some people have a problem with file. I found a problem in function access. This function is missing in VxWorks. After

Re: [sqlite] Multi column ORDER BY across table peformance problem....

2009-04-23 Thread sorka
For this particular query, the only reason for the join on the channel table is simply to order by channel number and that's it. Currently, what I'm doing is leaving off the order by channel number. Since this is done through the C++ interface, I'm stepping through results until a showing with a

[sqlite] Query takes ages

2009-04-23 Thread Marco Bambini
I have a query that takes ages ... my app remains in the first sqlite_step for more than 30 minutes (with 100% CPU time). Query is: SELECT reseaux.name, reseaux.id_reseau, reseaux.insee_id, panneaux.insee_id, panneaux .reseau_id ,insee .commune ,afficheurs

Re: [sqlite] Sporadic freezes of sqlite

2009-04-23 Thread Dan
On Apr 23, 2009, at 10:05 PM, Pavel Ivanov wrote: > I think, this will be an awesome option for me, thanks! > I believe you are talking about sacrificing consistency not only over > power outage but over SIGKILL too, right? It's a bit worse to have > though I think it will be acceptable in my

Re: [sqlite] Sporadic freezes of sqlite

2009-04-23 Thread Pavel Ivanov
I think, this will be an awesome option for me, thanks! I believe you are talking about sacrificing consistency not only over power outage but over SIGKILL too, right? It's a bit worse to have though I think it will be acceptable in my case, because more stable response time is more important for

Re: [sqlite] Sporadic freezes of sqlite

2009-04-23 Thread D. Richard Hipp
On Apr 23, 2009, at 10:39 AM, John Stanton wrote: > Running in an unsafe mode for speed does not mean that ultimately > there > will have to be no writes, > > Perhaps you could devise a system where you post writes to a queue and > have another thread or process perform the writes

Re: [sqlite] Transaction commit performance

2009-04-23 Thread John Stanton
COMMIT does the heavy lifting, which is why it consumes resources. It actualy performs the safe write to the disk. Alessandro Merolli wrote: > Hi all, > >I'm working on a project that makes massively usage of SQL > statements with many inserts/selects. It's a multi-threaded process >

Re: [sqlite] Sporadic freezes of sqlite

2009-04-23 Thread John Stanton
Running in an unsafe mode for speed does not mean that ultimately there will have to be no writes, Perhaps you could devise a system where you post writes to a queue and have another thread or process perform the writes asynchronously. You would then use otherwise idle machine time for

[sqlite] little modification of .genfkey trigger naming

2009-04-23 Thread jan
Hi, this question is more a C question than sql related: I am not a C expert at all so I wanted to ask if the little changes I made in shell.c are ok. It seems to work ... I use .genfkey because it is very useful if I have many fk constraints. I thought it is useful to identify what the

Re: [sqlite] Multi column ORDER BY across table peformance problem....

2009-04-23 Thread Jeremy Hinegardner
Ah, i see, so you are going to be calling this many times, and slowly incrementing the value of startTime. Yes, in this query, if you have more than 8 shows at a particular start time, then when you increment the time to go to the next 'batch' of shows you will miss all the ones from then end of

[sqlite] Sqlite flushing from cache to disk

2009-04-23 Thread Aneesh
Hi All, I would like to use sqlite for an arm-linux embedded project. My storage space is a flash drive and it have some life time and it depends on write cycles. So i wold like to minimize the disk hitting of data write. I am planning to store all data in to sqlite cache and whenever data

Re: [sqlite] Creating procedures in sqlite

2009-04-23 Thread Kris Groves
Perhaps this helps ? http://sqlite.org/c3ref/create_function.html Jyoti Seth wrote: > Hi All, > > > > SQLite lacks built-in support for stored procedures. We need to create it in > our application. Please guide me any alternative method to achieve this > functionality. > > > > Thanks, > >

[sqlite] Creating procedures in sqlite

2009-04-23 Thread Jyoti Seth
Hi All, SQLite lacks built-in support for stored procedures. We need to create it in our application. Please guide me any alternative method to achieve this functionality. Thanks, Jyoti ___ sqlite-users mailing list sqlite-users@sqlite.org