> On Mar 16, 2018, at 1:24 AM, Hick Gunter <[email protected]> wrote: > > So in your application you don't care about when a temperature was measured? > Creating a table temps (patient_id, timestamp, temperature) with an index on > (timestamp,temperature) would yield a fast way to access patients with > elevated temperatures within a time frame.
That was just an example. I work on a general-purpose database layered on SQLite, whose data/document format is JSON, and which allows arbitrary queries of that JSON. The question is how to efficiently index values that occur inside arrays (or objects), i.e. where there are multiple values to be indexed per row. Yes, the solution involves creating a table as you described, but the table is derived from and dependent on the original JSON data, and needs to be kept up to date as that data changes. Triggers are the best way I know of to do that, but I'm open to other ideas. —Jens _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

