Re: [sqlite] Transactions for read operations

2014-09-07 Thread Richard Warburton
Thanks to those who responded to my query. Simon: It will be easier to code if every page commits, regardless of whether any write operations occurred (and rollback only error) - so your answer pleased me greatly. Keith: Yes, you're right. I'm not passing a single database connection around,

Re: [sqlite] Transactions for read operations

2014-09-06 Thread Keith Medcalf
>To: General Discussion of SQLite Database >Subject: Re: [sqlite] Transactions for read operations > > >On 7 Sep 2014, at 3:49am, Keith Medcalf <kmedc...@dessus.com> wrote: > >> You say "the database connection". Did you use the language >imprecisely or ar

Re: [sqlite] Transactions for read operations

2014-09-06 Thread Simon Slavin
On 7 Sep 2014, at 3:49am, Keith Medcalf wrote: > You say "the database connection". Did you use the language imprecisely or > are you using only one database connection? One presumes that you may have > half-a-million pages and half-a-billion concurrent HTTP operations,

Re: [sqlite] Transactions for read operations

2014-09-06 Thread Darren Duncan
As a general principle, database transactions should be held for as short a time as possible. You should start your transaction, then do all of the operations immediately that need to be mutually consistent, and then end the transaction appropriately; ideally a transaction is only open for a

Re: [sqlite] Transactions for read operations

2014-09-06 Thread Keith Medcalf
On Saturday, 6 September, 2014, at 20:23, Richard Warburton inquired: >Brief: >Should transactions be used for ensuring consistency between multiple >queries? And if so, after I've finished is there a reason why I should >not call commit? >Background: >I'm

Re: [sqlite] Transactions for read operations

2014-09-06 Thread Simon Slavin
On 7 Sep 2014, at 3:22am, Richard Warburton wrote: > Should transactions be used for ensuring consistency between multiple > queries? Good idea. > And if so, after I've finished is there a reason why I should not > call commit? You should finish the

[sqlite] Transactions for read operations

2014-09-06 Thread Richard Warburton
Hi, Brief: Should transactions be used for ensuring consistency between multiple queries? And if so, after I've finished is there a reason why I should not call commit? Background: I'm using SQLite for a web service. The database reference is passed to Page objects, which handle their specific