Re: [sqlite] optimizing out function calls

2005-11-13 Thread Joe Wilson
What do other databases return for the types of SQL queries below? SELECT random(1) AS func FROM test ORDER BY func; SELECT random() AS func FROM test WHERE func > 10; MS Access appears to assume all functions called with the same arguments are constant and returns the same result for every

Re: [sqlite] optimizing out function calls

2005-11-13 Thread Eric Bohlman
[EMAIL PROTECTED] wrote: Nathan Kurz <[EMAIL PROTECTED]> wrote: SELECT uid, match("complex", "function", vector) AS match FROM vectors ORDER BY match DESC LIMIT 20; SELECT uid, mx FROM (SELECT uid, match(...) AS mx FROM vectors LIMIT -1) ORDER BY mx DESC LIMIT 20; The LIMIT -1 on the

Re: [sqlite] uSQLiteServer Source code available

2005-11-13 Thread John Stanton
[EMAIL PROTECTED] wrote: I have reorganized the archive and got all the source into it this time. http://users.iol.it/irwin A few notes: 1) This has nothing to do with the RPC based uSQLite project, which I have found has the same name! That project does seem a bit dead thougth so I shall not

Re: [sqlite] Lite Network wrapper

2005-11-13 Thread Lindsay
[EMAIL PROTECTED] wrote: Yes, Webapps may benefit from such a light and easy protocol. Unfortunately, AFAIK, browser shells do not make sockets available to scripts such as _javascript_, so you will need a plugin like Java or Flash. Or tunnel it over http. I say this because I actually u

Re: [sqlite] optimizing out function calls

2005-11-13 Thread Jay Sprenkle
On 11/13/05, Nathan Kurz <[EMAIL PROTECTED]> wrote: > > On Sun, Nov 13, 2005 at 07:30:58AM -0500, [EMAIL PROTECTED] wrote: > Or even better, is there any way to write a user defined function that > could do the ordering and limiting internally to reduce the data set > early? I suppose I could do it

Re: [sqlite] optimizing out function calls

2005-11-13 Thread Nathan Kurz
On Sun, Nov 13, 2005 at 07:30:58AM -0500, [EMAIL PROTECTED] wrote: > Nathan Kurz <[EMAIL PROTECTED]> wrote: > > > > SELECT uid, match("complex", "function", vector) AS match FROM vectors > > ORDER BY match DESC LIMIT 20; > > SELECT uid, mx FROM > (SELECT uid, match(...) AS mx FROM vector

RE: [sqlite] uSQLiteServer Source code available

2005-11-13 Thread roger
> > What might help interest and uptake, is to give us more detail on why > YOU found it so useful. For example, in your use of uSQLiteServer on > embedded systems, why didn't you just use an existing client-server > RDBMS? I have been using RDBMS's. This solves various recurrent problems: 1)

Re: [sqlite] optimizing out function calls

2005-11-13 Thread drh
Nathan Kurz <[EMAIL PROTECTED]> wrote: > > SELECT uid, match("complex", "function", vector) AS match FROM vectors > ORDER BY match DESC LIMIT 20; SELECT uid, mx FROM (SELECT uid, match(...) AS mx FROM vectors LIMIT -1) ORDER BY mx DESC LIMIT 20; The LIMIT -1 on the subquery is to fake o

Re: [sqlite] uSQLiteServer Source code available

2005-11-13 Thread Lorenzo Campedelli
Hi Roger, [EMAIL PROTECTED] wrote: I have reorganized the archive and got all the source into it this time. Just downloaded it, i'll give a look at it. ... 1) This has nothing to do with the RPC based uSQLite project, which I have found has the same name! That project does seem a bit dead thou