I have a table with about 40,000 records. About 100 random records get updated every second.
One of the most frequent queries on that table is getting a the last 30 updated records. (i get last updated by checking a timestamp, which is one of the fields for each record)
I just found out about MySQL views, and was wondering if I can use views to optimize this. Basically my plan is to create a view of, well, "Select * from base_table order by time_stamp desc limit 30".
My question is: will this improve (or decrease, or make no impact on) performance at all? Maintaining the view must have a performance impact too. How/When does the view get updated? (i.e. when the base table is updated? or when the view is accessed?)
Thanks for any input!