[sqlite] Sqlite Locking and Busy

2006-03-08 Thread John Stanton
For the person having difficulty with locking and busy with Sqlite it is important to recognize the LITE in the name. A single file is used to hold the entire database and each user process has that file open which means that the locking is restricted to file locks, which essentially lock the

[sqlite] "not an error"

2006-03-08 Thread Carl Jacobs
Hello, I have the following process (roughly) on a 3.xx database: == Start of process == 1) sqlite_prepare (an insert statement which is then used many times) 2) loop to insert data (thousands of iterations) sqlite_reset / sqlite_bindxxx / sqlite_step 3) 'ATTACH DATABASE secondary' do some

Re: [sqlite] sqlite performance with sizeable tables

2006-03-08 Thread spaminos-sqlite
- Original Message From: [EMAIL PROTECTED] To: sqlite-users@sqlite.org > SQLite inserts in records in primary key order. (That is not > strictly true - but it is close enough to being true for the > purposes of what follows.) So when you insert records that > are already in fname order,

RE: [sqlite] File locking additions

2006-03-08 Thread Marian Olteanu
I fully agree with you. This would be an external tool. But I underlined that building such a tool is not a big enterprise. It can be done by a good programmer in a reasonable amount of time. Also, I would say that perfect sync over network file systems done by sqlite is out of sqlite's scope. Esp

Re: [sqlite] Deadlock when using transactions?

2006-03-08 Thread Dennis Brakhane
On 3/8/06, John Stanton <[EMAIL PROTECTED]> wrote: > Try an EXCLUSIVE TRANSACTION. This wouldn't help, as other processes need to read from the database. I still think it's a bug: A cannot COMMIT it's changes, because B's INSERT failed! That just doesn't make any sense to me. Why does B need to R

Re: [sqlite] Deadlock when using transactions?

2006-03-08 Thread John Stanton
Try an EXCLUSIVE TRANSACTION. Dennis Brakhane wrote: (In case it matters, im running SQLite 3.2.8) Hi. I have a problem with multiple processes that use transactions on the same database: Suppose I have two processes that access the same database Now, both do a "begin transaction", which succe

Re: [sqlite] Busy management

2006-03-08 Thread John Stanton
Perhaps your best general approach is to establish some form of synchronization so that BUSYs never happen. That would simplify your logic. JS Ludovic Ferrandis wrote: I'm currently writing a C wrapper (yes, I know, yet another ... ;) for my applications. But it's a good training to learn. So

Re: [sqlite] File locking additions

2006-03-08 Thread John Stanton
We use the server approach, with a simple daemon on the remote machine which delivers its result in XML in accordance with the schema. It works well. Marian Olteanu wrote: I would say that the best way to access a sqlite database mounted from a remote file server, concurrently with other proc

[sqlite] VxWorks

2006-03-08 Thread Eric Evenson
Does anyone have experience using sqlite with VxWorks? I see references to VxWorks in the configure scripts, but it does not seem to be implemented. Any help would be appreciated. -- Eric

Re: [sqlite] Read row data into array?

2006-03-08 Thread Jay Sprenkle
On 3/8/06, Pam Greene <[EMAIL PROTECTED]> wrote: > On 3/8/06, cstrader <[EMAIL PROTECTED]> wrote: > > > > Would someone be willing to share with me c++ code that reads the result > > of a select query into an array representing the data of the j rows in a > > selected column? I understand that cal

Re: [sqlite] Read row data into array?

2006-03-08 Thread Pam Greene
On 3/8/06, cstrader <[EMAIL PROTECTED]> wrote: > > Would someone be willing to share with me c++ code that reads the result > of a select query into an array representing the data of the j rows in a > selected column? I understand that callback() is executed once for each row > of the data. But w

Re: [sqlite] File locking additions

2006-03-08 Thread Christian Smith
On Tue, 7 Mar 2006, Adam Swift wrote: >All, > >In order to provide locking support for database files mounted from >remote file systems (NFS, SMB, AFP, etc) as well as provide >compatible locking support between database clients both local and >remote, I would like to propose some additions to the

Re: [sqlite] File locking additions

2006-03-08 Thread Helmut Tschemernjak
Hello Adam, all, Cross platform locking is defiantly very important. The goal should be to use the identical sqlite DB via UNIX, AFP, SMB, NFS and others. My opinion is that it is not needed to have any additional open parameters, just use the locking features which are in common between all p

Re: [sqlite] Re: Deadlock when using transactions?

2006-03-08 Thread Dennis Brakhane
On 3/8/06, Igor Tandetnik <[EMAIL PROTECTED]> wrote: > BEGIN IMMEDIATE. Once BEGIN IMMEDIATE succeeds on one connection, it > will fail on other connections. Thanks

[sqlite] Re: Deadlock when using transactions?

2006-03-08 Thread Igor Tandetnik
Dennis Brakhane wrote: (In case it matters, im running SQLite 3.2.8) Hi. I have a problem with multiple processes that use transactions on the same database: Suppose I have two processes that access the same database Now, both do a "begin transaction", which succeeds Process A now issues "inse

Re: [sqlite] Read row data into array?

2006-03-08 Thread Jay Sprenkle
On 3/8/06, cstrader <[EMAIL PROTECTED]> wrote: > Would someone be willing to share with me c++ code that reads the result of a > select query into an array representing the data of the j rows in a selected > column? I understand that callback() is executed once for each row of the > data. But

[sqlite] Deadlock when using transactions?

2006-03-08 Thread Dennis Brakhane
(In case it matters, im running SQLite 3.2.8) Hi. I have a problem with multiple processes that use transactions on the same database: Suppose I have two processes that access the same database Now, both do a "begin transaction", which succeeds Process A now issues "insert into foo values ('bar')

Re: [sqlite] Busy management

2006-03-08 Thread Jay Sprenkle
On 3/8/06, Ludovic Ferrandis <[EMAIL PROTECTED]> wrote: > > The only issue that remain for instance, is how to manage the SQLITE_LOCKED > error. It's not very clear in the documentation when this error could be > returned (instead of SQLITE_BUSY). LOCKs happen when a process has the file locked fo

Re: [sqlite] sqlite_get_table performance problems

2006-03-08 Thread Rob Lohman
Hi, I suspect "your network" (solution) is to blame. The client probably needs to (re)connect to your server or (re-) authenticate etc. This can easily be tested by running the application and database on the same system. Is the first query does not take 2 seconds you have your answer. Keep in

Re: [sqlite] Busy management

2006-03-08 Thread Ludovic Ferrandis
I'm currently writing a C wrapper (yes, I know, yet another ... ;) for my applications. But it's a good training to learn. So I was looking at the best generic way to manage busy statement. My first idea was to use the callback option as it seems to be much simplier and it would benefit to all fun

[sqlite] Read row data into array?

2006-03-08 Thread cstrader
Would someone be willing to share with me c++ code that reads the result of a select query into an array representing the data of the j rows in a selected column? I understand that callback() is executed once for each row of the data. But what is the best and fastest way to iteratively write t

[sqlite] OT: patch for SQLite ODBC

2006-03-08 Thread Jarl Friis
Sorry for being OT, but I could not find a better place. I think when SQLite ODBC driver postings are very low-frequent, it wouldn't hurt to (ab)use this list for that. Christian Werner <[EMAIL PROTECTED]> writes: > Version 0.66 of the SQLite ODBC Driver is available > on http://www.ch-werner.de

Re: [sqlite] File locking additions

2006-03-08 Thread Jay Sprenkle
On 3/7/06, Marian Olteanu <[EMAIL PROTECTED]> wrote: > I would say that the best way to access a sqlite database mounted from a > remote file server, concurrently with other processes is through a database > server. My opinion is that the overhead of file sync and file locking for a > remote file s

RE: [sqlite] sqlite_get_table performance problems

2006-03-08 Thread Griggs, Donald
-Original Message- From: Patrik Svensson [mailto:[EMAIL PROTECTED] Subject: [sqlite] sqlite_get_table performance problems ... Can someone PLEASE PLEASE PLEASE help me? = Hi Patrik, The good folks on this list likely cannot hel

Re: [sqlite] sqlite_get_table performance problems

2006-03-08 Thread Jay Sprenkle
On 3/8/06, Patrik Svensson <[EMAIL PROTECTED]> wrote: > Hi, > > I have BIG BIG problems with my database (sqlite2). > > I have a 50Mb database located on a server. > From my client I run a quite large select statement using the > sqlite_get_table function. > > The first time this select is issued i

[sqlite] sqlite_get_table performance problems

2006-03-08 Thread Patrik Svensson
Hi, I have BIG BIG problems with my database (sqlite2). I have a 50Mb database located on a server. >From my client I run a quite large select statement using the sqlite_get_table function. The first time this select is issued it takes about 2 minutes to get the result. If I run the same select

Re: [sqlite] File locking additions

2006-03-08 Thread Manfred Bergmann
Hi. You guys already distribute a SQLite version with locking support for remote databases with Mac OSX. What would be the difference to that mechanism? To have this in the original SQLite would be great. Best regards, Manfred Am 08.03.2006 um 11:06 schrieb Adam Swift: All, In order to