Support » Plugin: Servebolt Optimizer » Index meta_value good practise?

  • Resolved moultrex



    Your plug in adds another index on wp_postmeta table on meta_value column making all the columns of the table to have an index. Is this a good practise? Isn’t having a full index on all columns make things slow down on UPDATE DELETE INSERT queries?

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author erlendeide


    Queries that do not use indexes do not scale.

    The postmeta table is often one of the largest and fastest growing tables for WooCommerce stores. There are a variety of plugins that add SELECT queries of the type “WHERE meta_value = 4234874”. Select queries are what is used in the frontend, and _not_ having this index means that any query like this will not use indexes, and will become slower for every row added in that table.

    It is correct that update, delete and insert queries will become slightly more expensive, and also use a little more database storage. This cost is a no-brainer though when the gain is getting rid of queries in the front-end that are not using indexes.

    Adding an index to the meta_value column is well worth the change for the performance gains.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Index meta_value good practise?’ is closed to new replies.