RE: [sqlite] Precompiled queries forcing db syncs?
> -Original Message- > From: Dan Thill [mailto:[EMAIL PROTECTED] > Sent: Monday, March 22, 2004 2:03 PM > To: Williams, Ken > Cc: [EMAIL PROTECTED] > Subject: Re: [sqlite] Precompiled queries forcing db syncs? > > > Ahh. The archives I was browsing must be a few days behind. Actually, I couldn't find that message from DRH in my list mailbox either, I only found the *reply* to it from [EMAIL PROTECTED] on 3/18. Maybe DRH accidentally only sent his message to Dave. It's an important point though, and I haven't seen it yet in the docs, though I might have overlooked it. -Ken - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [sqlite] Precompiled queries forcing db syncs?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 In short, when I switch to precompiled queries, according to gprof, it looks like the DB is being synched after every call, even though I've issued PRAGMA synchronous=OFF. As a result, using precompiled queries is an order of magnitude slower. Make sure you're compiling the queries *inside* your transaction boundaries. According to a message from DRH a few days ago, this is necessary to avoid syncing: Ahh. The archives I was browsing must be a few days behind. Worked like a charm. Also discovered that the mcount and _moncount are symbols inserted by gcc when profiling is enabled. Many thanks. I'd been stumped for a few days on this one. At least now I have a decent knowledge of the SQLite source :) - -dan -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (Darwin) iD8DBQFAX0aBU/zGB5xpbyoRAn/QAJ9O4FrBjPYqfqASXcZXRzTndYb+sQCeNK2c 4KxbYyRT2hYCsBc/CNTM7M0= =ugHG -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [sqlite] Precompiled queries forcing db syncs?
> -Original Message- > From: Dan Thill [mailto:[EMAIL PROTECTED] > Sent: Monday, March 22, 2004 10:34 AM > To: [EMAIL PROTECTED] > Subject: [sqlite] Precompiled queries forcing db syncs? > > In short, when I switch to precompiled queries, according to gprof, it > looks like the DB is being synched after every call, even though I've > issued PRAGMA synchronous=OFF. As a result, using > precompiled queries is an order of magnitude slower. Make sure you're compiling the queries *inside* your transaction boundaries. According to a message from DRH a few days ago, this is necessary to avoid syncing: On Mar 18, 2004, at 12:14 PM, D. Richard Hipp wrote: > To run a query within a transaction, you also have to compile > it within a transaction. To run a query outside of a transaction > it should be compiled outside of the transaction. -Ken - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]