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 may

Re[2]: [sqlite] Effect of blobs on performance

2007-02-22 Thread Teg
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. C Thursday, February 22, 2007, 9:56:57 AM, you wrote: dhc> Teg <[EMAIL PROTECTED]> wrote: >> >> I'm pretty sure an

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 database

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 thi

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 extensive

Re[2]: [sqlite] Effect of blobs on performance

2007-02-22 Thread Teg
Hello drh, Thursday, February 22, 2007, 9:08:08 AM, you wrote: dhc> 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"); dhc> With synchronous=OFF, a powe

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 goin

Re[2]: [sqlite] Effect of blobs on performance

2007-02-22 Thread Teg
Hello drh, Thursday, February 22, 2007, 7:54:58 AM, you wrote: dhc> A common use for SQLite is as an application file format. When you do File->>Open, instead of reading and parsing a bunch of dhc> information in a proprietary format, just call sqlite3_open() dhc> on the file instead. File->Sa

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 an

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 one

Re[2]: [sqlite] Effect of blobs on performance

2007-02-21 Thread Ion Silvestru
>* 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 one file (aka one row in DB) corrupted. -

Re[2]: [sqlite] Effect of blobs on performance

2007-02-21 Thread Ion Silvestru
>>I'm fairly sure disk space requirements will be nearly identical in >>each case... In case of blobs in SQLite there will be less disk space used than in case of file system (cluster size etc.) - To unsubscribe, send e

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 SQLite

Re: [sqlite] Effect of blobs on performance

2007-02-21 Thread Thomas Fjellstrom
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 database as a blob

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
t query/update performance. 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 <[

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 applic

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 and

Re: [sqlite] Effect of blobs on performance

2007-02-21 Thread P Kishor
On 2/21/07, 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 and

[sqlite] Effect of blobs on performance

2007-02-21 Thread Brett Keating
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 and hold the filename in the database. My table has around