Re: [sqlite] Optimizing for space and speed

2006-01-14 Thread Dan Kennedy
--- Martin O'Leary <[EMAIL PROTECTED]> wrote: > Hi guys, > > I have a table like the following: > > CREATE TABLE user_actions ( > uid INTEGER NOT NULL, > actionid INTEGER NOT NULL, > time INTEGER NOT NULL, > status INTEGER NOT NULL, > PRIMARY KEY (uid, actionid, time,

Re: [sqlite] Optimizing for space and speed

2006-01-11 Thread drh
Martin O'Leary <[EMAIL PROTECTED]> wrote: > On 1/11/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Martin O'Leary <[EMAIL PROTECTED]> wrote: > > > > > > Also, with regard to 3.3.0, the alpha release seems to slow down my > > > example query by about 20% (The virtual machine opcodes are > > >

Re: [sqlite] Optimizing for space and speed

2006-01-11 Thread Martin O'Leary
On 1/11/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Martin O'Leary <[EMAIL PROTECTED]> wrote: > > > > Also, with regard to 3.3.0, the alpha release seems to slow down my > > example query by about 20% (The virtual machine opcodes are > > identical). Is this a bug? > > > > A bug is when it

Re: [sqlite] Optimizing for space and speed

2006-01-11 Thread drh
Martin O'Leary <[EMAIL PROTECTED]> wrote: > > Also, with regard to 3.3.0, the alpha release seems to slow down my > example query by about 20% (The virtual machine opcodes are > identical). Is this a bug? > A bug is when it gets the wrong answer. Nevertheless we are concerned about

Re: [sqlite] Optimizing for space and speed

2006-01-11 Thread drh
[EMAIL PROTECTED] wrote: > > The query as you have specified it runs in O(NlogN) time > where N is the number of rows in the table. Actually, the original query runs in O(N) time. I was mistaken. But I still think I am right in saying that my "manual" scheme runs in O(MlogN) time. So the

Re: [sqlite] Optimizing for space and speed

2006-01-11 Thread drh
Martin O'Leary <[EMAIL PROTECTED]> wrote: > Hi guys, > > I have a table like the following: > > CREATE TABLE user_actions ( > uid INTEGER NOT NULL, > actionid INTEGER NOT NULL, > time INTEGER NOT NULL, > status INTEGER NOT NULL, > PRIMARY KEY (uid, actionid, time, status) >

[sqlite] Optimizing for space and speed

2006-01-11 Thread Martin O'Leary
Hi guys, I have a table like the following: CREATE TABLE user_actions ( uid INTEGER NOT NULL, actionid INTEGER NOT NULL, time INTEGER NOT NULL, status INTEGER NOT NULL, PRIMARY KEY (uid, actionid, time, status) ); And I want to carry out a query something like this: SELECT