>> > 1) How "expensive" is a call to sqlite3_open. Does a call to
>> sqlite3_enable_shared_cache make it "cheaper"?
>>
>>Its cost depends on the size of your schema as it gets parsed during
>>open.
>
> Isn't this contradictory with an answer by Igor made in a recent thread?

It's not contradictory. I say that "real cost" of sqlite3_open is
parsing the schema. Igor says that this cost is actually deferred from
inside sqlite3_open call to the first "substantive" sqlite3_step call.
So you will have to pay this price anyway, just profiler output would
be somewhat confusing.


Pavel

On Tue, Nov 30, 2010 at 1:50 PM, Jean-Christophe Deschamps
<j...@q-e-d.org> wrote:
> Pavel,
>
>> > 1) How "expensive" is a call to sqlite3_open. Does a call to
>> sqlite3_enable_shared_cache make it "cheaper"?
>>
>>Its cost depends on the size of your schema as it gets parsed during
>>open.
>
>
> Isn't this contradictory with an answer by Igor made in a recent thread?
>
>>Subject: Re: [sqlite] sqlite3_open on non-DB files / corrupt DBs
>>
>>
>>Nick Shaw <nick.s...@citysync.co.uk> wrote:
>> > Is there a reason that sqlite3_open() will happily "open" a non-sqlite
>> > file, returning SQLITE_OK, instead of returning SQLITE_NOTADB, which
>> > would seem a more obvious return value?
>>
>>SQLite doesn't actually touch the file until the first "substantive"
>>statement is executed on the connection. This allows one to set
>>various PRAGMAs that can only be set before the database is created.
>
>
>
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to