Re: [sqlite] HELP WITH SQLITE INTERNALS - VDBE and Virtual tables

2007-10-18 Thread Scott Hess
On 10/17/07, Uma Krishnan <[EMAIL PROTECTED]> wrote: > Yes. Makes sense (not to cache query results for embedded apps). > So what is cached. Just dirty pages? or are raw tables cached when > queried? SQLite implements a tables and indices as btrees over a pager layer. The pager layer caches

Re: [sqlite] HELP WITH SQLITE INTERNALS - VDBE and Virtual tables

2007-10-17 Thread John Stanton
PostgreSQL has the capability of storing pre-compiled SQL so that it can be reused and have data bound to the compiled statement. I have not looked at the mechanics, but it would be of interest and educational for you to see the PostgreSQL approach. Sqlite does cache the results of a query.

Re: [sqlite] HELP WITH SQLITE INTERNALS - VDBE and Virtual tables

2007-10-17 Thread Uma Krishnan
Yes. Makes sense (not to cache query results for embedded apps). So what is cached. Just dirty pages? or are raw tables cached when queried? Thanks Uma Scott Hess <[EMAIL PROTECTED]> wrote: On 10/17/07, Trevor Talbot wrote: > On 10/17/07, Uma Krishnan wrote: > > One other question, when a

Re: [sqlite] HELP WITH SQLITE INTERNALS - VDBE and Virtual tables

2007-10-17 Thread Scott Hess
On 10/17/07, Trevor Talbot <[EMAIL PROTECTED]> wrote: > On 10/17/07, Uma Krishnan <[EMAIL PROTECTED]> wrote: > > One other question, when a query is issued, does SQLite cache the results, > > so that future queries can be processed off the cache (I think not) > > Like the "query cache" in some

Re: [sqlite] HELP WITH SQLITE INTERNALS - VDBE and Virtual tables

2007-10-17 Thread Trevor Talbot
On 10/17/07, Uma Krishnan <[EMAIL PROTECTED]> wrote: > As far as I know, Postgres does not have a virtual engine. I could be wrong. It's not a virtual machine style, where it has a specific instruction set; instead it's more like a graph of operations. Execution means walking a graph instead of

Re: [sqlite] HELP WITH SQLITE INTERNALS - VDBE and Virtual tables

2007-10-17 Thread Trevor Talbot
On 10/17/07, Uma Krishnan <[EMAIL PROTECTED]> wrote: > One other question, when a query is issued, does SQLite cache the results, so > that future queries can be processed off the cache (I think not) Like the "query cache" in some other databases? No. SQLite does have a cache of database

RE: [sqlite] HELP WITH SQLITE INTERNALS - VDBE and Virtual tables

2007-10-17 Thread Griggs, Donald
Regarding: "... when a query is issued, does SQLite cache the results, so that future queries can be processed off the cache (I think not) " ... = P.S. And I should certainly have mentioned the sqlite items below: http://sqlite.org/pragma.html PRAGMA cache_size=

RE: [sqlite] HELP WITH SQLITE INTERNALS - VDBE and Virtual tables

2007-10-17 Thread Griggs, Donald
Regarding: "... when a query is issued, does SQLite cache the results, so that future queries can be processed off the cache (I think not) " Hi Uma, In effect, powerful caching effects *do* occur because of the disk cache provided by modern operating systems. Since the hard disk operations

Re: [sqlite] HELP WITH SQLITE INTERNALS - VDBE and Virtual tables

2007-10-17 Thread Uma Krishnan
Thanks John and Joe for your responses. As far as I know, Postgres does not have a virtual engine. I could be wrong. One other question, when a query is issued, does SQLite cache the results, so that future queries can be processed off the cache (I think not) Thanks Uma John Stanton <[EMAIL

Re: [sqlite] HELP WITH SQLITE INTERNALS - VDBE and Virtual tables

2007-10-16 Thread John Stanton
Moreover, is it typical to have an implementation like VDBE in other databases as well? This is a common approach and has been used for a very long time. For example we used it in products produced during the 1980s because producing a virtual machine and a compiler for its

Re: [sqlite] HELP WITH SQLITE INTERNALS - VDBE and Virtual tables

2007-10-16 Thread Joe Wilson
--- Uma Krishnan <[EMAIL PROTECTED]> wrote: > I'm a student trying to understand SQLite for my DB project. There are a > couple of aspects that > I don't quite understand: > 1) VDBE. I see how the vdbe stack is created using VDBEAddOp etc. But once > the code is > generated, I don't see when

[sqlite] HELP WITH SQLITE INTERNALS - VDBE and Virtual tables

2007-10-16 Thread Uma Krishnan
Hello, I'm a student trying to understand SQLite for my DB project. There are a couple of aspects that I don't quite understand: 1) VDBE. I see how the vdbe stack is created using VDBEAddOp etc. But once the code is generated, I don't see when it's executed. Moreover, is it typical to have an