Magento 2. Declarative schema. What is the use of the memory engine?
-
03-03-2021 - |
Question
When creating tables using the Declarative Schema one can set the engine="" attribute value as memory.
I can't seem to find an example in the core. What is a use-case for this configuration, how does it behave and how you retrieve|store values in|from such a table?
Reference M2 Dev Docs
Solution
Currently Magento2 uses InnoDb engine but this configuration for Memory engine if you want to configure it.
in core all most of tmp table created with memory engine:
catalog_product_index_price_opt_tmp
catalog_product_index_price_final_tmp
catalog_product_index_price_cfg_opt_agr_tmp
catalog_product_index_price_cfg_opt_tmp
catalog_product_index_price_opt_agr_tmp
catalog_product_index_eav_tmp
catalog_product_index_eav_decimal_tmp
catalog_product_index_price_tmp
cataloginventory_stock_status_tmp
and some more tables....
for more please see
https://dev.mysql.com/doc/refman/8.0/en/memory-storage-engine.html