Re: [sqlite] [EXTERNAL] Re: select for power-meter accumulated total readings

2019-10-20 Thread Hick Gunter
>What about if I want 1 hour granity? (to plot a graph of daily consumption for >example) For a (meaningful, as opposed to "all interpolated values") granularity of 1 hour, information theory states that you need a sample every 30 minutes or less. The desire to charge consumers more for "peak

Re: [sqlite] [EXTERNAL] Roadmap?

2019-10-20 Thread Hick Gunter
The "virtual table playground gadget" was our primary reason for selecting SQLite in the first place, because none of our production data sources are native SQLite tables. Instead, we have about 20 virtual table modules that implement about 1000 virtual table instances. -Ursprüngliche Nachr

Re: [sqlite] Roadmap?

2019-10-20 Thread Warren Young
On Oct 20, 2019, at 9:20 PM, Darren Duncan wrote: > > Rowan, you're talking about Unicode codepoints; however, Unicode graphemes, > what typical humans consider to be characters, are sequences of 1..N > codepoints, example a letter plus an accent that get composed together, and > this is what

Re: [sqlite] Roadmap?

2019-10-20 Thread Darren Duncan
Rowan, you're talking about Unicode codepoints; however, Unicode graphemes, what typical humans consider to be characters, are sequences of 1..N codepoints, example a letter plus an accent that get composed together, and this is what takes those large tables; this is related to Unicode Normal Fo

Re: [sqlite] Roadmap?

2019-10-20 Thread Rowan Worth
On Sun, 20 Oct 2019 at 17:04, Simon Slavin wrote: > Another common request is full support for Unicode (searching, sorting, > length()). But even just the tables required to identify character > boundaries are huge. > Nitpick: there are no tables required to identify character boundaries. For u

Re: [sqlite] Count Rows Inserted into FTS5 Index w/ External Content Table

2019-10-20 Thread Ben Asher
Interesting! I appreciate the detailed response. I don't think the shadow table digging fits our risk profile exactly :), but it's interesting to know where to look if we want to check ourselves. I realized after rereading all of this that ultimately we want to keep track of the max rowid insert

Re: [sqlite] select for power-meter accumulated total readings

2019-10-20 Thread Petr Jakeš
On Sun, Oct 20, 2019 at 8:23 PM Petr Jakeš wrote: > > > On Sun, Oct 20, 2019 at 4:36 PM Keith Medcalf wrote: > >> >> On Sunday, 20 October, 2019 06:58, Petr Jakeš >> wrote: >> >> >On Sun, Oct 20, 2019 at 2:53 AM Keith Medcalf >> wrote: >> >> >> On Saturday, 19 October, 2019 18:26, Petr Jakeš <

Re: [sqlite] select for power-meter accumulated total readings

2019-10-20 Thread Petr Jakeš
On Sun, Oct 20, 2019 at 4:36 PM Keith Medcalf wrote: > > On Sunday, 20 October, 2019 06:58, Petr Jakeš > wrote: > > >On Sun, Oct 20, 2019 at 2:53 AM Keith Medcalf > wrote: > > >> On Saturday, 19 October, 2019 18:26, Petr Jakeš < > petr.jakes@gmail.com> wrote: > > >>> After long time I have

Re: [sqlite] Roadmap?

2019-10-20 Thread Jens Alfke
 > On Oct 20, 2019, at 12:53 AM, Thomas Kurz wrote: > > many "playground" gadgets keep being implemented (like virtual columns, > virtual tables, FTS3/4/5, ...), I suspect you are used to database servers, and haven’t used SQLite as an embedded library inside an app (its primary use case.) Vi

Re: [sqlite] select for power-meter accumulated total readings

2019-10-20 Thread Keith Medcalf
On Sunday, 20 October, 2019 06:58, Petr Jakeš wrote: >On Sun, Oct 20, 2019 at 2:53 AM Keith Medcalf wrote: >> On Saturday, 19 October, 2019 18:26, Petr Jakeš >> wrote: >>> After long time I have set up development environment properly and I >>> am able to start to study your queries. >>> I

Re: [sqlite] Standard deviation last x entries

2019-10-20 Thread Bart Smissaert
This is getting far away from SQLite now and moving to medical statistics. The thing is that the authors of this algorithm have taken a large amount of patient data and have calculated what the best predictors are to calculate the chance for the individual patient to have a heart attack or stroke i

Re: [sqlite] Standard deviation last x entries

2019-10-20 Thread Richard Damon
In my experience max(x) - min(x) isn't a great measure for this sort of thing, as it is ultimately dependent on outliers. Something like 75%-tile to 25%-tile (or other similar values) might make more sense. Ultimately, taking a Standard Deviation (or Variance) of a set of reading for a set of pers

Re: [sqlite] select for power-meter accumulated total readings

2019-10-20 Thread Petr Jakeš
On Sun, Oct 20, 2019 at 2:53 AM Keith Medcalf wrote: > On Saturday, 19 October, 2019 18:26, Petr Jakeš > wrote: > > >After long time I have set up development environment properly and I am > >able to start to study your queries. > > >I am lost. I don't either understand the first bunch of subque

Re: [sqlite] Standard deviation last x entries

2019-10-20 Thread Bart Smissaert
Yes, could use something else than SD, but the mentioned calculator uses SD. Got this all working fine now. RBS On Sun, 20 Oct 2019, 13:31 Gabor Grothendieck, wrote: > Another approach is to question whether you really need the > standard deviation or if any measure of variation would do. > > Y

Re: [sqlite] Why sqlite3 running at different time can have very different speed?

2019-10-20 Thread Simon Slavin
On 20 Oct 2019, at 12:36pm, Peng Yu wrote: > I am on Mac OS X. Is there anything equivalent? Thanks. Have the database stored on a Flash Drive. Eject (or unmount) the Flash Drive. Works on all versions of all operating systems. ___ sqlite-users mail

Re: [sqlite] Standard deviation last x entries

2019-10-20 Thread Gabor Grothendieck
Another approach is to question whether you really need the standard deviation or if any measure of variation would do. You could use the range, max(x) - min(x) , and just report it as the range rather than the standard deviation. Also range/4 approximates the standard deviation (google the range

Re: [sqlite] Roadmap?

2019-10-20 Thread Dan Kennedy
On 20/10/62 14:53, Thomas Kurz wrote: I'd kindly ask whether there is some sort of roadmap for SQLite development? Someone recently pointed out how much he loves the "lite" and well-thought features. I cannot see that: I observe that many "playground" gadgets keep being implemented (like virtu

Re: [sqlite] Why sqlite3 running at different time can have very different speed?

2019-10-20 Thread Peng Yu
> You can try clearing Linux file system cache to convince > yourself that cache misses contributes to performance drop. > > Run this as root: > > # sync; echo 3 > /proc/sys/vm/drop_caches I am on Mac OS X. Is there anything equivalent? Thanks. -- Regards, Peng

Re: [sqlite] Standard deviation last x entries

2019-10-20 Thread Bart Smissaert
Thanks for that and have tried this now (on Android app) and works fine. It is fast as well, although slightly slower than the previous version. I ran this on a column with 8000 values ranging from 0 to 1600 and this took about 140 milli-seconds on a fast Samsung S9 phone. Database is on a SD. I t

Re: [sqlite] Roadmap?

2019-10-20 Thread Simon Slavin
On 20 Oct 2019, at 8:53am, Thomas Kurz wrote: > I'd kindly ask whether there is some sort of roadmap for SQLite development? Only private to the developers, probably just mentioning whatever they're worried about at the moment. Nothing public. > Someone recently pointed out how much he loves

Re: [sqlite] Roadmap?

2019-10-20 Thread Darren Duncan
On 2019-10-20 12:53 a.m., Thomas Kurz wrote: I'd kindly ask whether there is some sort of roadmap for SQLite development? Someone recently pointed out how much he loves the "lite" and well-thought features. I cannot see that: I observe that many "playground" gadgets keep being implemented (like

Re: [sqlite] Count Rows Inserted into FTS5 Index w/ External Content Table

2019-10-20 Thread Dan Kennedy
On 19/10/62 06:31, Ben Asher wrote: Hello! I'm trying to write some code to keep an external content table in sync with the index. To do this, I need to be able to get some state about the index: either how many rows have been inserted so far or the max rowid that has been inserted into the inde

[sqlite] Roadmap?

2019-10-20 Thread Thomas Kurz
I'd kindly ask whether there is some sort of roadmap for SQLite development? Someone recently pointed out how much he loves the "lite" and well-thought features. I cannot see that: I observe that many "playground" gadgets keep being implemented (like virtual columns, virtual tables, FTS3/4/5, ..