sqlite - SQL: splitting up WITH statements into read-only tables -
i working on project in sqlite several insert statements involve recursive statements. these insert statements within triggers watching insert statements beingness called on other databases.
i've found leads recalculation of lots of values every time statement triggered, , rather introduce logic statement recalculate values need recalculated (which creates sprawl , hard me maintain), i'd rather take of temporary views defined in statement , create them permanent tables cache values. i'd chain triggers update of table_1 leads update of table_2, leads update of table_3, etc.. makes code easier debug , maintain.
the issue that, in project, want create clear distinction between tables user editable , meant caching intermediary values. 1 way (perhaps) create "caching" tables read-only except when called via triggers. i've seen few questions similar issues in other dialects of sql nil pertaining sqlite , nil looking solve problem, new question.
any help appreciated!
sql sqlite
No comments:
Post a Comment