Re: [sqlite] Effect of blobs on performance

2007-02-22 Thread drh
Teg <[EMAIL PROTECTED]> wrote: > Hello drh, > > You tested under Windows with synchronous=OFF? I mean specifically > that way. I've never seen Sqlite trash a DB when I had synchronous > turned on even with app crashes. > An application crash should not corrupt the DB even with synchronous=OFF.

Re: [sqlite] Effect of blobs on performance

2007-02-22 Thread P Kishor
see below for a counter perspective On 2/22/07, John Stanton <[EMAIL PROTECTED]> wrote: Thomas Fjellstrom wrote: > On February 21, 2007, [EMAIL PROTECTED] wrote: > >>"Brett Keating" <[EMAIL PROTECTED]> wrote: >> >>>Hi, >>> >>>I'm curious about what the effect of having a blob in the database

Re: [sqlite] Effect of blobs on performance

2007-02-22 Thread John Stanton
Thomas Fjellstrom wrote: On February 21, 2007, [EMAIL PROTECTED] wrote: "Brett Keating" <[EMAIL PROTECTED]> wrote: Hi, I'm curious about what the effect of having a blob in the database may be on performance. I have two design options: 1) put a small image file (15-30kbyte) into the

Re: [sqlite] Effect of blobs on performance

2007-02-22 Thread Dennis Jenkins
[EMAIL PROTECTED] wrote: Dennis Jenkins <[EMAIL PROTECTED]> wrote: these are the settings that our app uses when it creates/opens the sqlite database: db.ExecuteImmediate("PRAGMA synchronous=OFF"); With synchronous=OFF, a power failure might result in database corruption. Is

Re: [sqlite] Effect of blobs on performance

2007-02-22 Thread drh
Teg <[EMAIL PROTECTED]> wrote: > > I'm pretty sure an application crash even without power failure can > corrupt to. At least in my experience. I keep synchronous on and > simply use "insert or ignore" syntax within a transaction to get > performance. > It is not suppose to. There are

Re: [sqlite] Effect of blobs on performance

2007-02-22 Thread Denis Sbragion
Hello Dan, On Thu, February 22, 2007 06:08, Dan Kennedy wrote: > * Can include blob operations as part of atomic transactions. me too. Transactions are a major advantage of database blobs. Bye, -- Denis Sbragion InfoTecna Tel: +39 0362 805396, Fax: +39 0362 805404

Re: [sqlite] Effect of blobs on performance

2007-02-22 Thread drh
Dennis Jenkins <[EMAIL PROTECTED]> wrote: > > these are the settings that our app uses when it creates/opens the sqlite > database: > > db.ExecuteImmediate("PRAGMA synchronous=OFF"); With synchronous=OFF, a power failure might result in database corruption. Is this an issue for you? -- D.

Re: [sqlite] Effect of blobs on performance

2007-02-22 Thread Dennis Jenkins
Thomas Fjellstrom wrote: I still wonder about the utility of storing binary data in the db itself. Maybe it makes it more easy to distribute that way, but how often does one distribute an entire database in a "vendor specific" format? I'm quite interested in hearing people's reasoning for

Re: [sqlite] Effect of blobs on performance

2007-02-22 Thread drh
Thomas Fjellstrom <[EMAIL PROTECTED]> wrote: > > I still wonder about the utility of storing binary data in the db itself. > Maybe it makes it more easy to distribute that way, but how often does one > distribute an entire database in a "vendor specific" format? A common use for SQLite is as

Re: [sqlite] Effect of blobs on performance

2007-02-22 Thread drh
Ion Silvestru <[EMAIL PROTECTED]> wrote: > >* In SQLite, my blobs won't be corrupted if the machine loses power > > the way they (probably) will be if I write my own code to access > > the file-system. > > But, in case of a corruption, you will have entire blob DB corrupted versus > at least

Re: [sqlite] Effect of blobs on performance

2007-02-21 Thread Dan Kennedy
> I'm quite interested in hearing people's reasoning for going the blob route, > when you have a perfectly good "database" format for "blobs" already (various > filesystems). Three technical reasons for me personally: * Can include blob operations as part of atomic transactions. * In

RE: [sqlite] Effect of blobs on performance

2007-02-21 Thread Brett Keating
Thanks I think this answers my question well! Brett -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 21, 2007 1:41 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Effect of blobs on performance "Brett Keating" <[EM

RE: [sqlite] Effect of blobs on performance

2007-02-21 Thread Brett Keating
e. Thanks, Brett -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of P Kishor Sent: Wednesday, February 21, 2007 1:38 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Effect of blobs on performance On 2/21/07, Brett Keating <[EMAIL PROTECTED]> wrot

Re: [sqlite] Effect of blobs on performance

2007-02-21 Thread Eric Scouten
My suggestion: Do a quick experiment. I had a similar question a year or so ago. I wrote some code a year or so that generated random blobs of varying sizes and tossed them into a SQLite DB and onto files on the file system (Mac OS). There are some complicating variables, such as our

Re: [sqlite] Effect of blobs on performance

2007-02-21 Thread drh
"Brett Keating" <[EMAIL PROTECTED]> wrote: > Hi, > > I'm curious about what the effect of having a blob in the database may > be on performance. I have two design options: 1) put a small image file > (15-30kbyte) into the database as a blob, and 2) store the image in a > separate file on disk