I have some demanding mysql queries that have to select same frequently updated datasets from 5-7 mysql tables. ‘Select’ operation would be a bit more than CUD.
I am thinking of creating a table or materialized view to gather all demanding columns from other tables, so as to reduce overall query times to different tables and thus increase performance.
If I create that table, I may need to do extra insert / update / delete operation each time other tables updated.
if I create materialized view, I am worrying if the performance can be greatly improved. Because data from other tables are changing very frequently. Most likely, the view may need to be created first everytime before selecting it.
Any ideas? e.g. how to cache? other extra measures I can do?
It seems to me that you are thinking along the lines of the “materialized view” concept.
Mysql does not provide an implementation of this, though it can be simulated with some more or less sophistication (I do something similar to the later in Postgresql – it’s handy for complex non-parametrized queries that are frequently used in reports, and for which is tolerable to have not totally up-to-date data).