Dan,
 Can you explain to me how within the context of the test_server.c code that 
the 
 sqlite3_enable_shared_Cache will improve concurrency, for a single DB file 
access?
 
 I just don't see where any concurrency is gained. Sure maybe some memory 
savings. But I must be brain dead, because I don't see how it could improve 
concurrency given that a single thread is used to perform db access. And all 
clients are queued and blocked upon the single threads message queue.
 
 Thanks,
 Ken
 
 
 

Dan Kennedy <[EMAIL PROTECTED]> wrote: > Which in that case whats the point of 
a shared cache? 
> What is it shared against, since all threads must send 
> data to the shared server anyways and none may access
> it concurrently.

The idea is to have a single cache shared accessed by
more than one logical connection (read: more than one
transaction context). It's meant to reduce IO and memory
usage in the case that a process opens more than one 
connection to the same database file.

It's quite a specialised feature. Only really useful
if you are implementing an embedded server.

Dan



> One thing that Other database engines do is allow read and writes to occur 
> without blocking. That is a Reader never blocks a writer and a Writer never 
> blocks a reader. SQLITE does not do this, Only a single writer or Multiple 
> readers, but not both concurrently.
>  
> I'm not trying to pick on sqlite, just pointing out that it really doesn't 
> perform multi threading or even conncurrent access very well in a read/write 
> environment. Read Only, its great. Single threaded Read/Write ... Very good 
> as well.
>  
>  Regards,
>  Ken
>  
> 
> 
> 
> 
> Doug Nebeker  wrote: > > Yes I did the same experiment with a lock that made 
> thread A wait  
> > > until B was finished. So actually only one thread can be active at
> the time.
> > > I don't see how the outcome of this experiment can be of  any 
> > > interest, as there is no time reduction any longer. But your  guess
> is 
> > > right that, it works.
> > 
> >How would multiple threads be faster than a single one when you are
> accessing a single resource?
> 
> Assumably the thread that is accessing the database either spends some
> time gathering data to write
> or processing data it read.  The single resource isn't in use during
> that time.
> 
> This email was sent to you by Reuters, the global news and information 
> company. 
> To find out more about Reuters visit www.about.reuters.com
> 
> Any views expressed in this message are those of the individual sender, 
> except where the sender specifically states them to be the views of Reuters 
> Limited.
> 
> Reuters Limited is part of the Reuters Group of companies, of which Reuters 
> Group PLC is the ultimate parent company.
> Reuters Group PLC - Registered office address: The Reuters Building, South 
> Colonnade, Canary Wharf, London E14 5EP, United Kingdom
> Registered No: 3296375
> Registered in England and Wales
> 
> 
> 
> -----------------------------------------------------------------------------
> To unsubscribe, send email to [EMAIL PROTECTED]
> -----------------------------------------------------------------------------
> 
> 


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------


Reply via email to