I have scoured the SQLite website, but I am not able to find a reference that answers the question below. If I have missed it, and you can point me to it, that would be great. Thank you. Consider that I have a view ViewA. Now, I use ViewA in a UNION query as below: select something from ViewA UNION ALL select somethingelse from ViewA UNION ALL select athirdthing from ViewA UNION ALL . . . My question is: is the query for ViewA run multiple times in the above query or is ViewA computed once, stored in memory and used for all the queries in the compound query without being run multiple times? Thank you.