5 ms·
Not really. In this context they're a hint to the optimizer to evaluate the CTE result store=materialize it somewhere and use that snapshot when the CTE is que
by fforflo 2y ago
Not really. In this context they're a hint to the optimizer to evaluate the CTE result store=materialize it somewhere and use that snapshot when the CTE is queried subsequently.
The alternative means the CTE is copy-pasted essentially and them evaluated.
The closest one can get to materialized views in SQLite is probably with CREATE TABLE AS. Drop and recreate.
- epompeii 2y agoI think you are totally right! The VIEW itself is not a "materialized" view, but when the (normal) view is instantiated within a single query it is treated as MATERIALIZED because it is used multiple times in the query execution: https://www.sqlite.org/lang_with.html#materialization_hints https://www.sqlite.org/lang_with.html#materialization_hints