Re: [sqlite] Nested Parens Stack Overflow

2007-02-22 Thread drh
Martin Jenkins <[EMAIL PROTECTED]> wrote: > > I think you said that you generate the queries? If so, do you have to > nest so many nested ORs? I'm no SQL expert but > > AND ( Customer.FullName in ( > 'Amazon.com.ksdc, Inc. - Campbellsville', [...] > 'Okami2', > 'Qui

Re: [sqlite] Nested Parens Stack Overflow

2007-02-22 Thread drh
"Matt Froncek" <[EMAIL PROTECTED]> wrote: > I have a program generator that creates ORs in SQL nested. This causes a > stack overflow in SQLite. Has this been addressed or will it be? SQLite uses a push-down automaton to parse the input SQL. (See http://en.wikipedia.org/wiki/Pushdown_automaton) I

Re: [sqlite] Nested Parens Stack Overflow

2007-02-22 Thread Martin Jenkins
Matt Froncek wrote: Martin, Thank you for looking into this. The SQLite3.exe I tested with was 3.1.3. And yes the SQL statement works fine as it. If you add one more nested OR to the SQL statement then it stops working. I don't get a stack overflow like I do in the ODBC driver I was testing with

RE: [sqlite] Nested Parens Stack Overflow

2007-02-22 Thread Matt Froncek
Martin, Thank you for looking into this. The SQLite3.exe I tested with was 3.1.3. And yes the SQL statement works fine as it. If you add one more nested OR to the SQL statement then it stops working. I don't get a stack overflow like I do in the ODBC driver I was testing with but it errors with a

Re: [sqlite] SQLite in Adobe Lightroom

2007-02-22 Thread Eric Scouten
On 22 Feb 2007, at 09:45, Jeff Godfrey wrote: Also, if this is deemed too far off topic for the list, I'll be happy to take it offline. I'm assuming this is getting off-topic for the SQLite list, so I'll respond to Jeff offline. -Eric ---

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] SQLite in Adobe Lightroom

2007-02-22 Thread Jeff Godfrey
- Original Message - From: "Eric Scouten" <[EMAIL PROTECTED]> To: Sent: Thursday, February 22, 2007 10:55 AM Subject: Re: [sqlite] SQLite in Adobe Lightroom As the Adobe engineer who did much of the work to embed SQLite into Lightroom, I do want to express a couple of cautions about

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] SQLite in Adobe Lightroom

2007-02-22 Thread Eric Scouten
As the Adobe engineer who did much of the work to embed SQLite into Lightroom, I do want to express a couple of cautions about directly manipulating your Lightroom library. (1) If you change data in the database, this is unsupported; make backups as it's certainly possible to create a DB th

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] SQLite in Adobe Lightroom

2007-02-22 Thread drh
Dennis Cote <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > > > download the > > SQLite 3.3.14 and use it. > > > > > I assume that was a typo, and the version should have been either 3.3.4 > or 3.3.13. Or are you working on another release as we speak (or type)? > Wasn't exactly a "

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] SQLite in Adobe Lightroom

2007-02-22 Thread Dennis Cote
[EMAIL PROTECTED] wrote: download the SQLite 3.3.14 and use it. I assume that was a typo, and the version should have been either 3.3.4 or 3.3.13. Or are you working on another release as we speak (or type)? Dennis Cote

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: [sqlite] about default file permission of SQLite database file

2007-02-22 Thread Shan, Zhe (Jay)
I've tried umask, but it does not work for SQLite. I search this emaillist, and find the following message in 2003 which is related to this topic. I want to check if it is still true in the current version. Thanks. Jay From: Dong Xuezhang-A19583 <[EMAIL PROTECTED]

Re: [sqlite] SQLite in Adobe Lightroom

2007-02-22 Thread Jeff Godfrey
- Original Message - From: <[EMAIL PROTECTED]> To: Sent: Thursday, February 22, 2007 6:37 AM Subject: Re: [sqlite] SQLite in Adobe Lightroom "Jeff Godfrey" <[EMAIL PROTECTED]> wrote: > Though it's only a matter of curiosity, I wonder if anyone > here knows how/where Adobe employed SQ

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] Using AVG() Correctly

2007-02-22 Thread Rich Shepard
On Thu, 22 Feb 2007, miguel manese wrote: Best example using your particular case is Igor's answer: select cat, pos, avg(col1), avg(col2), ... from voting group by cat, pos; Thank you, Miguel. Rich -- Richard B. Shepard, Ph.D. |The Environmental Permitting Applied Eco

Re: [sqlite] Re: Using AVG() Correctly

2007-02-22 Thread Rich Shepard
On Wed, 21 Feb 2007, Igor Tandetnik wrote: The query looks good. What's the data in the pos column? Could it be that the average is indeed zero? Igor, Of course! I was not thinking it completely through and now it's quite clear. select cat, pos, avg(col1), avg(col2), ... from voting group

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] SQLite in Adobe Lightroom

2007-02-22 Thread Daniel Önnerby
This is great! I can imagine that there will be several opensource galleries taking advantage of this in the future. [EMAIL PROTECTED] wrote: "Jeff Godfrey" <[EMAIL PROTECTED]> wrote: Though it's only a matter of curiosity, I wonder if anyone here knows how/where Adobe employed SQLite in

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] SQLite in Adobe Lightroom

2007-02-22 Thread drh
"Jeff Godfrey" <[EMAIL PROTECTED]> wrote: > Though it's only a matter of curiosity, I wonder if anyone > here knows how/where Adobe employed SQLite in the Lightroom product? > Adobe stores just about all of your Lightroom state in an SQLite database. Find the database (on your Mac) at ~/Pict

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: [sqlite] Precision of dates stores as Julian "real"

2007-02-22 Thread drh
"McDermott, Andrew" <[EMAIL PROTECTED]> wrote: > Hi, > > > [EMAIL PROTECTED] wrote: > > > Guess you can't please everybody :-) Right now we have some > > > documentation in the source tree and some on the wiki, > > which I suppose > > > is guaranteed to please nobody. > > > > So make the

RE: [sqlite] Precision of dates stores as Julian "real"

2007-02-22 Thread McDermott, Andrew
Hi, > [EMAIL PROTECTED] wrote: > > Guess you can't please everybody :-) Right now we have some > > documentation in the source tree and some on the wiki, > which I suppose > > is guaranteed to please nobody. > > So make the wiki available for download. ;) I would like this too. ;) Ofte