Simon Slavin wrote:
> On 29 Apr 2014, at 2:24pm, Drago, William @ MWG - NARDAEAST
> wrote:
>
>> Does closing the connection force, or at least encourage, the OS to write to
>> disk whatever it might have been caching?
>
> Closing a connection calls fclose() on the
On 29 Apr 2014, at 2:24pm, Drago, William @ MWG - NARDAEAST
wrote:
> Does closing the connection force, or at least encourage, the OS to write to
> disk whatever it might have been caching?
Closing a connection calls fclose() on the database file (as long as fopen()
> -Original Message-
> From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
> boun...@sqlite.org] On Behalf Of Yuriy Kaminskiy
> Sent: Monday, April 28, 2014 8:36 PM
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] When to open/close connections
>
Simon Slavin wrote:
> On 28 Apr 2014, at 11:11pm, RSmith wrote:
>
>> Second approach is better when you rarely access the database, also it will
>> make sure releases happen (or at least provide immediate errors if not), but
>> keeping a connection open is much better when
On 28 Apr 2014, at 11:11pm, RSmith wrote:
> Second approach is better when you rarely access the database, also it will
> make sure releases happen (or at least provide immediate errors if not), but
> keeping a connection open is much better when hundreds of accesses
Second approach is better when you rarely access the database, also it will make sure releases happen (or at least provide immediate
errors if not), but keeping a connection open is much better when hundreds of accesses happen in terms of speed - especially loads
of small queries, large queries
There's a discussion on another forum I'm on about whether it's good
practice to open an SQLite database as part of program initialization and
close it when the program terminates, or whether the connection should be
opened and closed around each transaction.
I've always used the first approach
7 matches
Mail list logo