It also depends on the database. If RDMS does not analyze the basic query based on your criteria, it may not work at all.
Most existing RDMSs will rewrite the query (I think some earlier versions of SQL Server, such as 6 or 7, did not), it will separate the view in the light of your query, and then rewrite it all based on its optimization methods .
Different query iterations using a view can have their own caching plans and get some performance this way.
So, from my understanding, at least theoretically (depending on the database optimizer), using views is no different from writing the entire query.
source share