Re: [sqlite] Database locked error, while deleting

2008-06-10 Thread Sabyasachi Ruj
Our PRAGMA cache_size = 4000. Is there any recommended way to calculate the cache size needed? On Tue, Jun 10, 2008 at 5:29 PM, Igor Tandetnik <[EMAIL PROTECTED]> wrote: > "Sabyasachi Ruj" <[EMAIL PROTECTED]> > wrote in message > news:[EMAIL PROTECTED]<[EMA

Re: [sqlite] Database locked error, while deleting

2008-06-10 Thread Sabyasachi Ruj
We are using two different connections to sqlite for these two different threads. So, we are not sharing the connection in SELECT and the DELETE thread. On Tue, Jun 10, 2008 at 5:28 PM, D. Richard Hipp <[EMAIL PROTECTED]> wrote: > > On Jun 10, 2008, at 7:36 AM, Sabyasachi Ruj wro

[sqlite] Database locked error, while deleting

2008-06-10 Thread Sabyasachi Ruj
Hi, I have a very big table with around 40,00, 000 rows. 4 columns. 220 MB. Now, I have two threads:- Thread1: Is deleting 7,00, 000 rows from the table. Thread2: Is doing SELECT on the same table. Now the problem is sometimes the sqlite3_prepare for the SELECT query is failing with SQLITE_BUSY

[sqlite] Cache resizing problem.

2007-12-04 Thread Sabyasachi Ruj
Hi, I am getting a problem if I am modifying cache size. This can be reproduced by the following steps:- We need two connections to reprodce this. Say the database name is: "test.db" *"test.db" SHOULD NOT BE EXISTING ALREADY, WE HAVE TO CREATE EACH TIME WE WANT TO GET THE PROBLEM.* 1. Create a

Re: [sqlite] Threading (again)

2007-11-26 Thread Sabyasachi Ruj
SQLite is completely threadsafe. So we can share a single database connection across threads, it the underlying OS is Okay. But I guess we can not share a sqlite3_stmt prepared statement across threads threads. Am I correct. Or am I missing something? -- Sabyasachi

[sqlite] Optimizing Application - SQLite Connection Creation/Sharing

2007-11-23 Thread Sabyasachi Ruj
I have an application that uses SQLite extensively. In a part of that application, I need to do the following steps:- 1. I need to create a thread per request basis. 2. Open SQLite connection. 3. Then retrieve data from SQLite and do some calculation. 4. Construct

Re: [sqlite] SQLite, pthread and daemon

2007-10-04 Thread Sabyasachi Ruj
f all versions of Sqlite. > > One da6tabase may be used across processes provided that you create the > connection according to the Sqlite rules and do it in the thread of > execution. > > Sabyasachi Ruj wrote: > > I read that. > > But it prohibits to use SQLite open ha

Re: [sqlite] SQLite, pthread and daemon

2007-10-04 Thread Sabyasachi Ruj
How do you know that when your process forks that you are looking at the > > child, not the parent? > > > > Sabyasachi Ruj wrote: > > > Hi, > > > > > > I am writing an application which will continue to execute as a > 'daemon' in > > > Li

[sqlite] SQLite, pthread and daemon

2007-10-03 Thread Sabyasachi Ruj
Hi, I am writing an application which will continue to execute as a 'daemon' in Linux. The application is multi threaded. And once the daemon is created, it will create few threads to perform some tasks. >From here, I'll refer the 'process before creating the daemon' as 'PARENT PROCESS', and

Re: [sqlite] SQLITE_CORRUPT recover

2007-06-18 Thread Sabyasachi Ruj
I still fail to understand what should I synchronize on. I am *not* sharing sqlite* across multiple threads. On 6/18/07, John Stanton <[EMAIL PROTECTED]> wrote: It is fundamental computer science, CS101 you might say. Pick up a textbook on basic computing. Sabyasachi Ruj wrote: > Bu

Re: [sqlite] SQLITE_CORRUPT recover

2007-06-18 Thread Sabyasachi Ruj
where the application programmer is insulated from synchronization issues. Sqlite has the "lite" in its name for a very good reason. It is designed for embedded applications, not as an enterprise DBMS. Sabyasachi Ruj wrote: > But the following link > http://www.sqlite.o

Re: [sqlite] SQLITE_CORRUPT recover

2007-06-18 Thread Sabyasachi Ruj
u have minimal problems and optimal performance. Sabyasachi Ruj wrote: > But I think we do not have to take care of synchronizing sqlite access. > sqlite internally does if it is compiled with THREADSAFE=1. > > On 6/18/07, John Stanton <[EMAIL PROTECTED]> wrote: > >>

Re: [sqlite] SQLITE_CORRUPT recover

2007-06-18 Thread Sabyasachi Ruj
so you just use fundamental synchronization logic as you would when sharing any resource between competing threads. Sabyasachi Ruj wrote: > Hi, > > I am using sqlite in a multithreaded environment. I have take > reasonable like not sharing sqlite* handles. I am creating a new sqlite* &g

Re: [sqlite] SQLITE_CORRUPT recover

2007-06-18 Thread Sabyasachi Ruj
error message. My application updates the database very 2 mins and the corruption happend randomly I dont have any clue how to debug this! Thanks. On 5/11/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: "Sabyasachi Ruj" <[EMAIL PROTECTED]> wrote: > Hi, > Is there any

[sqlite] SQLITE_CORRUPT recover

2007-05-11 Thread Sabyasachi Ruj
Hi, Is there any way to programmatically fix a corrupted sqlite database? I am using sqlite version 3.3.8 with C APIs -- Sabyasachi