Shopware 6 Data Abstraction Layer (DAL) Indexing Explain
Let’s start with an official Shopware documentation explanation:
Data records are read way more often than they are written. Therefore it is worthwhile to spend a little more time on the writing process in order to minimize the effort required for the reading process. This is done in the DAL via the Entity Indexer pattern. As soon as a product record is written, the corresponding Product Indexer is triggered, which pre-selects certain aggregations and writes them away optimized for the later reading process.
Let's put it short, to speed up the shop site, the background actions are required. These actions are done asynchronously i.e. in the background of the show and it calls DAL Indexing.
What does DAL Indexing do?
It depends on the entity. Most action happens on the product entity, like calculation of the stock, cheapest price, seo_url, etc.
All entities have an Indexer class, that determines what needs to be done. For example: