How to improve category indexer performance in local development setup warden Magento 2?

If you are working with warden setup for Magento 2 local development and your category indexer taking much time to perform indexing. This article is definitely for you to improve the performance of category indexers with the warden.

I am using MariaDB for the warden and it’s taking time to perform category indexer.

You need to set a few database variable configurations in the warden-env.yml file to fix the catalog category indexer speed-up issue:

db:
    command:
        - mysqld
        - --max_allowed_packet=1024M
        - --explicit_defaults_for_timestamp=on
        - --optimizer_search_depth=4
        - --optimizer_use_condition_selectivity=1
        - --optimizer_switch="rowid_filter=off"

After setting the above variables in the env file, You need to stop and restart the warden environment to see the effect on the project.