mardi 21 avril 2015

SQLite - selecting from a view with conditions, when are rows filtered?

The question is about SQLite. Suppose I have a view which is a result of a join of multiple tables, the tables are linked with foreign key constraints and all indexes are in place, and a select statement against such a view is executed and it uses a where condition which selects only a subset of the available rows. For each statement, the view must be 'materialized' (I don't know what the real word is), but is it materialized fully for all rows and the filtering from the select takes place then, or is the view materialized in a 'smart' way in which it already pre-filters the data somehow? Does it even matter? How does this work?

Aucun commentaire:

Enregistrer un commentaire