On Tue, Jul 22, 2008 14:24:38 PM -0400, Igor Tandetnik wrote:
 
> Are you familiar with SQLite full-text search (FTS) extension?

No, thanks for the link, will study it.

> > - calculation of moving average of a floating field, eg if a table is
...
> Any solution in pure SQL is going to be awkward. Personally, I'd run
> a simple query like
> 
> select MONTH, SALES_TOTAL from Sales order by MONTH
> 
> and, as I iterate through the resultset, keep a queue and a running
> sum of the last 12 totals.

By "keep a queue and a running sum" you mean "do the running sum in
whatever language (C, Php, Perl...) you are calling SQLite from",
right? If yes, that's what I'm doing already, and I know an SQL-only
solution is awkward.

But putting all the queries in SQLite reduces the work to be done if I
want to use that same database and query from many independent
programs, say a Php web page, a Perl Script and OpenOffice via ODBC:
development speed vs query speed.

So, yes, I'll insist :-), if nothing else to find out, with the list
help, the fastest possible SQL-only solution. I'm not at the PC with
the sqlite database right now, but will test your query asap. In the
meantime, again, any other optimization trick, on this or other
specific cases, is welcome!

Thanks,
                        Marco
-- 
Your own civil rights and the quality of your own life heavily depend on
how software is used *around* you:               http://digifreedom.net/
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to