Does the view get automatically updated when the underlying tables get updated in MySQL without querying?
To further elaborate - if I update the table then does the view get updated even if I don't run any query on the view?
解决方案
Every time you execute a query on the view, it will fetch the data currently in tables - included all committed transactions on it, but not those UPDATE or INSERT queries taht have still not been committed.
but of course, once you have got that data, it will not send it again. There are triggers for that, but still your database client has to query the view data out.
To clear up a bit more: View does not store (cache) the data, it is a logical structure and will always look into the underlying tables.