Re: [sqlite] Multi-threading Common Problem

2011-05-24 Thread John Deal
..@gmail.com> > Subject: Re: [sqlite] Multi-threading Common Problem > To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org> > Date: Tuesday, May 24, 2011, 10:32 AM > > I don't want per-say to remove > my pthread_rwlock() but the main point

Re: [sqlite] Multi-threading Common Problem

2011-05-24 Thread Pavel Ivanov
assume it is >> returning SQLITE_BUSY).  With my pthread_rwlock(), I have >> multiple threads reading the DB and my writes get the >> exclusive access they need.  Now I could loop on the write >> until it gets in but that seems very wasteful. >> > >> > So how

Re: [sqlite] Multi-threading Common Problem

2011-05-24 Thread John Deal
that. Pthread_rwlock() works fine. Thanks, John --- On Tue, 5/24/11, Pavel Ivanov <paiva...@gmail.com> wrote: > From: Pavel Ivanov <paiva...@gmail.com> > Subject: Re: [sqlite] Multi-threading Common Problem > To: "General Discussion of SQLite Database" <sqlite-users@s

Re: [sqlite] Multi-threading Common Problem

2011-05-24 Thread Pavel Ivanov
the write until it gets in but that seems very > wasteful. > > So how do I implement the equivalent of a pthread_rwlock() using SQLite > mechinisms? > > Thanks, > > John > > --- On Tue, 5/24/11, Roger Binns <rog...@rogerbinns.com> wrote: > >> From: Roger Binns <

Re: [sqlite] Multi-threading Common Problem

2011-05-24 Thread Simon Slavin
On 24 May 2011, at 12:43pm, John Deal wrote: > Sorry to be so brain-dead but I am still confused. I have multiple threads, > each with their own DB connection. Read http://www.sqlite.org/threadsafe.html If it's not clear to you please ask specific questions about what's on that page, since

Re: [sqlite] Multi-threading Common Problem

2011-05-24 Thread John Deal
nks, John --- On Tue, 5/24/11, Roger Binns <rog...@rogerbinns.com> wrote: > From: Roger Binns <rog...@rogerbinns.com> > Subject: Re: [sqlite] Multi-threading Common Problem > To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org> > Date: Tuesday, May

Re: [sqlite] Multi-threading Common Problem

2011-05-24 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/23/2011 09:12 PM, John Deal wrote: > I guess I am lost on how to obtain a many reader or one writer mutex in > SQLite. You are confusing locks on the database and locks in the library on a sqlite3 pointer. The latter is what the mutex alloc

Re: [sqlite] Multi-threading Common Problem

2011-05-23 Thread John Deal
s. Thanks, John --- On Fri, 5/13/11, Roger Binns <rog...@rogerbinns.com> wrote: > From: Roger Binns <rog...@rogerbinns.com> > Subject: Re: [sqlite] Multi-threading Common Problem > To: sqlite-users@sqlite.org > Date: Friday, May 13, 2011, 2:00 AM > -BEGIN PGP SIGNED

Re: [sqlite] Multi-threading Common Problem

2011-05-13 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/12/2011 01:26 PM, John Deal wrote: > Good question. Very possible my understanding is not complete. This document has the full details: http://www.sqlite.org/lockingv3.html >I have basically read and write transactions, each potentially

Re: [sqlite] Multi-threading Common Problem

2011-05-12 Thread John Deal
Hello Roger, OK I see your point now. I could most likely remove the OS mutexes. Thanks, John --- On Thu, 5/12/11, Roger Binns <rog...@rogerbinns.com> wrote: > From: Roger Binns <rog...@rogerbinns.com> > Subject: Re: [sqlite] Multi-threading Common Problem > To: sq

Re: [sqlite] Multi-threading Common Problem

2011-05-12 Thread John Deal
Hello Pavel, This makes sense but I have shared cache on. Thanks. --- On Thu, 5/12/11, Pavel Ivanov <paiva...@gmail.com> wrote: > From: Pavel Ivanov <paiva...@gmail.com> > Subject: Re: [sqlite] Multi-threading Common Problem > To: "General Discussion of SQLi

Re: [sqlite] Multi-threading Common Problem

2011-05-12 Thread Pavel Ivanov
is taking place. > > If a write transaction is not taking place, I want to allow multiple reads > which the OS rwlock allows. > > Any enlightenment would be welcomed. > > Thanks. > > --- On Thu, 5/12/11, Roger Binns <rog...@rogerbinns.com> wrote: > >> F

Re: [sqlite] Multi-threading Common Problem

2011-05-12 Thread John Deal
> wrote: > From: Roger Binns <rog...@rogerbinns.com> > Subject: Re: [sqlite] Multi-threading Common Problem > To: sqlite-users@sqlite.org > Date: Thursday, May 12, 2011, 4:01 PM > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 05/12/2011 09:38 AM, John Dea

Re: [sqlite] Multi-threading Common Problem

2011-05-12 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/12/2011 09:38 AM, John Deal wrote: > I have been working for weeks on this and I feel there must be something > simple I am overlooking. Why are you discarding SQLite's builtin and tested mutexes and then effectively reimplementing your own

[sqlite] Multi-threading Common Problem

2011-05-12 Thread John Deal
Hello All, I have been using SQLite for a couple of years but have never posted to this list before. I am sure my problem is common and am looking for ideas to solve it. I have used SQLite extensively single-threaded with no problems (other than my own!). I am currently working on another

[sqlite] multi-threading multi-db problem

2009-02-18 Thread Christian Barth
Hello! I use the latest (3.6.11) version of the SQLite dll in a WinXP Application. The main task of this application is to store values from a sensor-hardware in multiple databases. Each DB contains a subset from the Values. I tested serveral design options. One is to read all values from the

Re: [sqlite] Multi-threading problem!

2009-01-28 Thread Ken
Create a connection for each thread. --- On Wed, 1/28/09, Anatoly Stepanov <anatoly.stepa...@kaspersky.com> wrote: > From: Anatoly Stepanov <anatoly.stepa...@kaspersky.com> > Subject: [sqlite] Multi-threading problem! > To: "sqlite-users@sqlite.org" <sqlite-u

[sqlite] Multi-threading problem!

2009-01-28 Thread Anatoly Stepanov
Hello! I use the latest (3.6.10) version of SQLite library. I was trying to perform query "select" from one table inside single database connection from different threads(up to 8 threads). In summary I had 50% CPU Usage( 2 core CPU)-this is a problem! I tried to find the reason in Debug mode and

Re: [sqlite] Multi-threading.

2005-07-30 Thread Tim Browse
Just FYI... All you people posting to comp.sys.15yearoldarguments - you know you're also cross-posting to the sqlite mailing list, right? Tim Mrs. Brisby wrote: On Sat, 2005-07-30 at 20:29 +0200, Jan-Eric Duden wrote: Mrs. Brisby wrote: On Sat, 2005-07-30 at 14:30 +0200, Jan-Eric Duden

Re: [sqlite] Multi-threading.

2005-07-30 Thread Mrs. Brisby
On Sat, 2005-07-30 at 20:29 +0200, Jan-Eric Duden wrote: > Mrs. Brisby wrote: > > >On Sat, 2005-07-30 at 14:30 +0200, Jan-Eric Duden wrote: > > > > > >>Win9X doesn't support the API async file operations. > >>WinNT/2K/XP does support it. > >> > >> > > > >It supports everything it needs to:

Re: [sqlite] Multi-threading.

2005-07-30 Thread Jan-Eric Duden
Mrs. Brisby wrote: On Sat, 2005-07-30 at 14:30 +0200, Jan-Eric Duden wrote: Win9X doesn't support the API async file operations. WinNT/2K/XP does support it. It supports everything it needs to:

Re: [sqlite] Multi-threading.

2005-07-30 Thread Mrs. Brisby
On Sat, 2005-07-30 at 14:30 +0200, Jan-Eric Duden wrote: > Win9X doesn't support the API async file operations. > WinNT/2K/XP does support it. It supports everything it needs to: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/waitformultipleobjects.asp it doesn't

Re: [sqlite] Multi-threading.

2005-07-29 Thread Mrs. Brisby
On Fri, 2005-07-29 at 14:29 -0700, Robert Simpson wrote: > Threads are a tool ... sortof like a chainsaw. Used properly, they can save > you time and accomplish your goal. In the hands of an expert, you can even > make some impressive art. Well, perhaps the latter only applies to >

Re: [sqlite] Multi-threading.

2005-07-29 Thread Mrs. Brisby
On Fri, 2005-07-29 at 16:22 -0600, K. Haley wrote: > Mrs. Brisby wrote: > > >Now, if you're feeling like you're on a high horse, go ahead: point out > >a single common platform where threads are the necessity. > > > >Here's some hints: > > > >* it's not windows > >* it's not unix > >* it's not

RE: [sqlite] Multi-threading.

2005-07-29 Thread Fred Williams
Reminds me alt.C in the News Groups, arguing over curly bracket placement :-( -Original Message- From: Puneet Kishor [mailto:[EMAIL PROTECTED] Sent: Friday, July 29, 2005 5:23 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Multi-threading. Fred Williams wrote: > How 'bout Y'

Re: [sqlite] Multi-threading.

2005-07-29 Thread K. Haley
Mrs. Brisby wrote: Now, if you're feeling like you're on a high horse, go ahead: point out a single common platform where threads are the necessity. Here's some hints: * it's not windows * it's not unix * it's not java (closures) * it's not lisp (closures) * it's not forth (coroutines) * it's

Re: [sqlite] Multi-threading.

2005-07-29 Thread Bert Verhees
Some class-libraries make multithreading programming really easy, piece of cake, even when there are points to synchronize again to a single thread (f.e. interface), it is easy. You do not need to be a genius to write multithreading/multithreaded code kind regards Bert Verhees

Re: [sqlite] Multi-threading.

2005-07-29 Thread Robert Simpson
Like it or not, you still don't have any idea what you are doing. They [threads] are never the only solution, and they are rarely appropriate. I'm certain I'm not being entirely clear on just how rare it is: Threads so rarely help that the programs that they CAN help don't often use them, and

RE: [sqlite] Multi-threading.

2005-07-29 Thread Fred Williams
To: sqlite-users@sqlite.org Subject: Re: [sqlite] Multi-threading. On Thu, 2005-07-28 at 07:42 -0500, Dennis Jenkins wrote: > Mrs. Brisby wrote: > > >meanwhile, two threads attempting to multiplex access to a single sqlite > >handle are a) bound to be confused, and b) need th

Re: [sqlite] Multi-threading.

2005-07-29 Thread Mrs. Brisby
On Thu, 2005-07-28 at 07:42 -0500, Dennis Jenkins wrote: > Mrs. Brisby wrote: > > >meanwhile, two threads attempting to multiplex access to a single sqlite > >handle are a) bound to be confused, and b) need those resource locks > >anyway. > > > > > > > (background: I've been using threads on

Re: [sqlite] Multi-threading.

2005-07-29 Thread Mrs. Brisby
On Thu, 2005-07-28 at 08:44 -0400, Eli Burke wrote: > Mrs. Brisby wrote: > > My PII-350 easily handles 2 million local deliveries per hour, and it > > fork()s for each one. > > > > As has been mentioned: If you think threads are going to make your > > program fast, you don't know what you're

Re: [sqlite] Multi-threading.

2005-07-28 Thread Eli Burke
Mrs. Brisby wrote: > My PII-350 easily handles 2 million local deliveries per hour, and it > fork()s for each one. > > As has been mentioned: If you think threads are going to make your > program fast, you don't know what you're doing. Like it or not, the world is bigger than just Unix. Some of

Re: [sqlite] Multi-threading.

2005-07-28 Thread Dennis Jenkins
Mrs. Brisby wrote: meanwhile, two threads attempting to multiplex access to a single sqlite handle are a) bound to be confused, and b) need those resource locks anyway. (background: I've been using threads on win32 since 1998. Sometimes to spread load across multiple CPUs, but usually

Re: [sqlite] Multi-threading.

2005-07-27 Thread Mrs. Brisby
On Wed, 2005-07-27 at 13:31 -0400, Andrew Piskorski wrote: > On Tue, Jul 26, 2005 at 10:21:22PM -0400, Mrs. Brisby wrote: > > > That's incorrect. Threading increases development time and produces less > > stable applications. In fairness: it's the skill level of the engineer ... > When people -

Re: [sqlite] Multi-threading.

2005-07-27 Thread Mrs. Brisby
On Wed, 2005-07-27 at 09:08 +0100, Paul Smith wrote: > At 03:21 27/07/2005, Mrs. Brisby wrote: > >On Mon, 2005-07-25 at 09:48 -0500, Jay Sprenkle wrote: > > > The theory has been proposed that threads aren't better than separate > > > processes, or application implemented context switching. Does

Re: [sqlite] Multi-threading.

2005-07-27 Thread Mrs. Brisby
On Tue, 2005-07-26 at 23:20 -0400, Kervin L. Pierre wrote: > We get all those threads related questions because SQLite > is difficult to use with threads and has sparse sometimes > conflicting documentation on the subject. Maybe people think that SQLite should serialize its own internals. Maybe

Re: [sqlite] Multi-threading.

2005-07-27 Thread Andrew Piskorski
On Tue, Jul 26, 2005 at 10:21:22PM -0400, Mrs. Brisby wrote: > That's incorrect. Threading increases development time and produces less > stable applications. In fairness: it's the skill level of the engineer Mrs. Brisby, that is probably quite correct in at least one particular sense, but since

Re: [sqlite] Multi-threading.

2005-07-27 Thread Christian Smith
On Wed, 27 Jul 2005, Paul Smith wrote: >At 03:21 27/07/2005, Mrs. Brisby wrote: >>On Mon, 2005-07-25 at 09:48 -0500, Jay Sprenkle wrote: >> > The theory has been proposed that threads aren't better than separate >> > processes, or application implemented context switching. Does anyone >> > have

Re: [sqlite] Multi-threading.

2005-07-27 Thread Paul Smith
At 03:21 27/07/2005, Mrs. Brisby wrote: On Mon, 2005-07-25 at 09:48 -0500, Jay Sprenkle wrote: > The theory has been proposed that threads aren't better than separate > processes, or application implemented context switching. Does anyone > have an experiment that will prove the point either way?

Re: [sqlite] Multi-threading.

2005-07-26 Thread Kervin L. Pierre
Mrs. Brisby wrote: chances are you can't use threads correctly either. This mailing list is an excellent example of how many "professional programmers" simply can't deal with threads- every problem they run into, it's "how do I make sqlite work with threads". If you have to ask that question,

Re: [sqlite] Multi-threading.

2005-07-26 Thread Mrs. Brisby
On Mon, 2005-07-25 at 09:00 +0100, Ben Clewett wrote: > I like what you say about computer science being a Science. This is > exactly my point. A science is a collection of theories which hold true > within a domain until otherwise dissproven. For instance Isac Newtons's > law of gravety and

Re: [sqlite] Multi-threading.

2005-07-26 Thread Mrs. Brisby
On Mon, 2005-07-25 at 09:48 -0500, Jay Sprenkle wrote: > The theory has been proposed that threads aren't better than separate > processes, or application implemented context switching. Does anyone > have an experiment that will prove the point either way? It will have > to be OS specific though,

Re: [sqlite] Multi-threading.

2005-07-25 Thread Jay Sprenkle
> Computer _Science_ is just that: Science. It's not opinion. What they taught me at university was the current collection of "best practices" for solving problems. "Here's a common problem, here are the known good algorithms for solving it. Here are the techniques we use for creating 'good'

Re: [sqlite] Multi-threading.

2005-07-25 Thread Ben Clewett
rd over 20 years ago. :) Ben. Steve -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] rg]On Behalf Of Ben Clewett Sent: 25 July 2005 09:01 To: sqlite-users@sqlite.org Subject: Re: [sqlite] Multi-threading. Dear Mrs Brisby, Thanks for your passionate replies to m

RE: [sqlite] Multi-threading.

2005-07-25 Thread Steve O'Hara
ve all got their origins in concepts put forward over 20 years ago. Steve -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] rg]On Behalf Of Ben Clewett Sent: 25 July 2005 09:01 To: sqlite-users@sqlite.org Subject: Re: [sqlite] Multi-threading. Dear Mrs Brisby, Thank

Re: [sqlite] Multi-threading.

2005-07-25 Thread Ben Clewett
Dear Mrs Brisby, Thanks for your passionate replies to my original posting. You have much information here. It's obvious I don't know everything about threading. I like what you say about computer science being a Science. This is exactly my point. A science is a collection of theories

RE: [sqlite] Multi-threading.

2005-07-22 Thread Mrs. Brisby
On Fri, 2005-07-22 at 17:23 -0400, D. Richard Hipp wrote: > On Fri, 2005-07-22 at 14:00 -0700, Tim McDaniel wrote: > > It is hard, if not impossible, with modern GUI > > systems to write any relatively complex app that is both performant and > > graphically responsive without using threads. > > >

RE: [sqlite] Multi-threading.

2005-07-22 Thread Mrs. Brisby
On Fri, 2005-07-22 at 14:00 -0700, Tim McDaniel wrote: > > History has demonstrated that programmers building > > multithreaded applications tend to produce buggier code, and > > code that touches more pages than a non-threaded version. As > > a result, the non-threaded version is easier to

RE: [sqlite] Multi-threading.

2005-07-22 Thread D. Richard Hipp
On Fri, 2005-07-22 at 14:00 -0700, Tim McDaniel wrote: > It is hard, if not impossible, with modern GUI > systems to write any relatively complex app that is both performant and > graphically responsive without using threads. > Not true. The event model works just fine for GUI programming. The

RE: [sqlite] Multi-threading.

2005-07-22 Thread Tim McDaniel
> -Original Message- > From: Mrs. Brisby [mailto:[EMAIL PROTECTED] > Sent: Friday, July 22, 2005 3:07 PM > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] Multi-threading. > > > However the need for multi-threads is compelling. > Especially in a GUI >

Re: [sqlite] Multi-threading.

2005-07-22 Thread Jay Sprenkle
On 7/22/05, Paul G <[EMAIL PROTECTED]> wrote: > > Using Exceptions correctly, I have never felt the need for a GoTo. > > Exceptions do the same as GoTo, accept, maybe, in a slightly more > > developed and useful way. > > then you haven't coded anything complex enough to require them. i can tell

Re: [sqlite] Multi-threading.

2005-07-22 Thread Paul G
- Original Message - From: "Ben Clewett" <[EMAIL PROTECTED]> To: <sqlite-users@sqlite.org> Sent: Wednesday, July 20, 2005 12:26 PM Subject: Re: [sqlite] Multi-threading. > Dr Hipp, > > I am just playing devils advocate here because I have completed muc

Re: [sqlite] Multi-threading.

2005-07-22 Thread Mrs. Brisby
On Wed, 2005-07-20 at 17:26 +0100, Ben Clewett wrote: > Dr Hipp, > > I am just playing devils advocate here because I have completed much > Java programming in a multi-threaded application. :) > > I understand the problems of multi-threading. I am reminded that it > took nearly 20 years of

Re: [sqlite] Multi-threading.

2005-07-20 Thread Ben Clewett
Dr Hipp, I am just playing devils advocate here because I have completed much Java programming in a multi-threaded application. :) I understand the problems of multi-threading. I am reminded that it took nearly 20 years of development to get multi-processor support in a modern OS stable. Much

Re: [sqlite] Multi-threading.

2005-07-16 Thread Kervin L. Pierre
Paul G wrote: richard's advice is solid. use async io/event loops if possible, separate processes if possible, threads as a last resort, in that order. the grey area is the 'if possible' test, since it's a multi-way tradeoff between performance, simplicity and provable (to an extent)

Re: [sqlite] Multi-threading.

2005-07-15 Thread Andrew Piskorski
On Fri, Jul 15, 2005 at 01:04:50PM -0400, Paul G wrote: > the issue wasn't necessarily the thread implementation per se, but the fact > that threads were treated as processes for scheduling purposes and hence > scheduled with the regular process scheduler, which was not efficient for a > large

Re: [sqlite] Multi-threading.

2005-07-15 Thread Craig Morrison
D. Richard Hipp wrote: On Fri, 2005-07-15 at 16:41 +0530, Roushan Ali wrote: Hello all, Can we use single sqlite_open handle(global) across threads( if all database operations are serialized by using semaphore) ? Please help. Opening a database connection in one thread

Re: [sqlite] Multi-threading.

2005-07-15 Thread Dennis Jenkins
Andrew Piskorski wrote: On Fri, Jul 15, 2005 at 04:21:05PM +0300, Cariotoglou Mike wrote: memory and cpu-wise. on Linux, this is nothing, it can handle it easily. otoh, 500 threads for windows is business as usual, but threading on Linux, is , I hear, iffy at best. Linux runs

Re: [sqlite] Multi-threading.

2005-07-15 Thread Paul G
- Original Message - From: "Andrew Piskorski" <[EMAIL PROTECTED]> To: <sqlite-users@sqlite.org> Sent: Friday, July 15, 2005 1:05 PM Subject: Re: [sqlite] Multi-threading. > On Fri, Jul 15, 2005 at 04:21:05PM +0300, Cariotoglou Mike wrote: > >

Re: [sqlite] Multi-threading.

2005-07-15 Thread Alex Chudnovsky
D. Richard Hipp wrote: Actually, this seems like a good opportunity to repeat my oft-ignored advice to not use more than one thread in a single address space. If you need multiple threads, create multiple processes. I think its not really an acceptable option for those who are on Windows

Re: [sqlite] Multi-threading.

2005-07-15 Thread Dennis Jenkins
Roushan Ali wrote: Hi, Thanks for your response. I don't have any idea how multiple connection objects work. Can you please tell us something about that. I wrappered the C interface to SQLite3 via a C++ Class called "CSqlite3". The constructor does NOT open the database, it just

Re: [sqlite] Multi-threading.

2005-07-15 Thread Roushan Ali
Hi, Thanks for your response. I don't have any idea how multiple connection objects work. Can you please tell us something about that. Thanks, Roushan On Fri, 2005-07-15 at 20:15, Dennis Jenkins wrote: > Roushan Ali wrote: > > >Thanks Richard for your reply. > > > >Actually, we have written

Re: [sqlite] Multi-threading.

2005-07-15 Thread Gerhard Haering
On Fri, Jul 15, 2005 at 08:27:14AM -0400, D. Richard Hipp wrote: > [...] > I am constantly amazed at the prevailing idea (exemplified > by Java) that software should be strongly typed and should > not use goto statement or pointers - all in the name of > reducing bugs - but that it is OK to use

Re: [sqlite] Multi-threading.

2005-07-15 Thread Dennis Jenkins
Roushan Ali wrote: Thanks Richard for your reply. Actually, we have written a windows application which uses four threads. Each thread may have to add/delete thousands of entries in the database( for performance reason , we don't want to open/close the database for each insertion/deletion)

Re: [sqlite] Multi-threading.

2005-07-15 Thread Roushan Ali
Thanks Richard for your reply. Actually, we have written a windows application which uses four threads. Each thread may have to add/delete thousands of entries in the database( for performance reason , we don't want to open/close the database for each insertion/deletion) .If we use different

RE: [sqlite] Multi-threading.

2005-07-15 Thread Cariotoglou Mike
applicable. > -Original Message- > From: D. Richard Hipp [mailto:[EMAIL PROTECTED] > Sent: Friday, July 15, 2005 3:27 PM > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] Multi-threading. > > On Fri, 2005-07-15 at 16:41 +0530, Roushan Ali wrote: > > Hello al

Re: [sqlite] Multi-threading.

2005-07-15 Thread D. Richard Hipp
On Fri, 2005-07-15 at 16:41 +0530, Roushan Ali wrote: > Hello all, > Can we use single sqlite_open handle(global) across threads( > if all database operations are serialized by using semaphore) ? Please > help. > Opening a database connection in one thread and using it in

[sqlite] Multi-threading.

2005-07-15 Thread Roushan Ali
Hello all, Can we use single sqlite_open handle(global) across threads( if all database operations are serialized by using semaphore) ? Please help. Regards, Roushan

Re: [sqlite] multi threading

2005-04-18 Thread Ben Clewett
Jay Sprenkle wrote: I also note the performance gains which can be obtained from modern hyperthreaded CPU's. Does Linux/Windows make each process a thread on these beasties? If so, wouldn't making each task a process end up being the same thing? Each process is a collection of one or more

Re: [sqlite] multi threading

2005-04-18 Thread Jay Sprenkle
> I also note the performance gains which can be obtained from modern > hyperthreaded CPU's. Does Linux/Windows make each process a thread on these beasties? If so, wouldn't making each task a process end up being the same thing?

Re: [sqlite] multi threading

2005-04-18 Thread Ben Clewett
Jay Sprenkle wrote: My advice to *all* programmers is to never use more than one thread in the same address space. I have never in 20 years worked on a multiple threaded program that actually got all of the threading issues right. There are always subtle bugs that cause error that are very

Re: [sqlite] multi threading

2005-04-18 Thread Jay Sprenkle
> My advice to *all* programmers is to never use more than one thread > in the same address space. I have never in 20 years worked on a > multiple threaded program that actually got all of the threading > issues right. There are always subtle bugs that cause error that > are very difficult to

Re: [sqlite] multi threading

2005-04-17 Thread Cosmin Vlasiu
: <sqlite-users@sqlite.org> Sent: Sunday, April 17, 2005 11:20 PM Subject: Re: [sqlite] multi threading SELECT id, code FROM a WHERE (code IN (SELECT code FROM (SELECT code, COUNT(code) AS c FROM a GROUP BY code) AS aaa WHERE c > 1) ) and O

Re: [sqlite] multi threading

2005-04-17 Thread Kurt Welgehausen
> SELECT id, code FROM a WHERE > (code IN > (SELECT code FROM > (SELECT code, COUNT(code) AS c FROM a GROUP BY code) AS aaa > WHERE c > 1) > ) >and ORDER BY code The "and" in your code is illegal, but it is better to use select id, code from a

Re: [sqlite] multi threading

2005-04-17 Thread Cosmin Vlasiu
users@sqlite.org> Sent: Saturday, April 16, 2005 2:11 AM Subject: Re: [sqlite] multi threading On Fri, 2005-04-15 at 14:44 +0300, Cosmin Vlasiu wrote: Hello to everyone, I have a question... regarding multi-threading... the question is for microsoft windows (a visual c++ application)... I sa

Re: [sqlite] multi threading

2005-04-15 Thread D. Richard Hipp
On Fri, 2005-04-15 at 14:44 +0300, Cosmin Vlasiu wrote: > Hello to everyone, > > I have a question... regarding multi-threading... > the question is for microsoft windows (a visual c++ application)... I saw > the documentation > and I understood that for microsoft OS, the multi-threading is

[sqlite] multi threading

2005-04-15 Thread Cosmin Vlasiu
Hello to everyone, I have a question... regarding multi-threading... the question is for microsoft windows (a visual c++ application)... I saw the documentation and I understood that for microsoft OS, the multi-threading is enabled by default. So, of course I start two threads, both of them