[sqlite] Computed column or create index on a view ?

2016-05-15 Thread Jean-Luc Hainaut
- No index on a view in SQLite (so far). - A computed column can be maintained through appropriate triggers (here, "on insert" and "on update"). Efficient if you read data more than you modify them. - Perhaps trying this: create table readings(...); create index trg_cx on

[sqlite] Computed column or create index on a view ?

2016-05-15 Thread Simon Slavin
On 15 May 2016, at 4:08pm, Jean-Luc Hainaut wrote: > - A computed column can be maintained through appropriate triggers (here, "on > insert" and "on update"). Efficient if you read data more than you modify > them. Hmm. Yes, you're right. Your way of simulating it is better than my way of

[sqlite] Computed column or create index on a view ?

2016-05-15 Thread Simon Slavin
I know that SQLite does not currently implement these things but I'm curious if anyone else wants them and how hard they would be to implement. I have what you might consider to be a computed column. You might imagine CREATE TABLE readings (timestamp TEXT PRIMARY KEY, a REAL, b