Size tables usually do not change very often, at least with respect to the number of inserts in the fact table. Size tables are also individually much smaller than a fact table. This makes size tables good candidates for caching.
What some people do with a good effect is to render partial HTML output for the form, and all the data is populated like drop-down menus, radio buttons, etc. Then, save this partial HTML under the memcached key so that you don’t have to do any of the database queries or render HTML for most PHP queries — you simply extract the pre-filled HTML fragment from memcached and echo it verbatim. I think of it as Ikea database output.
Of course, if you ever make changes to the data in the dimension table, you will need to invalidate the cached HTML or even better generate it and save the new version of HTML in memcached.
Regarding the execution of all queries, I will indicate that there is no need to use pseudo-docs in the fact table. You can use natural values and refer to the primary key of the dimension table, which can also be a natural key instead of a pseudocode. In some cases, this may take up a bit of space, but this excludes the search. Of course, it makes sense to continue to use pseudo-docs for sizes that are long varchars.
source share