{"id":233,"date":"2019-11-01T13:43:25","date_gmt":"2019-11-01T13:43:25","guid":{"rendered":"https:\/\/sdf-docs.mansystems.com\/docs\/acr-rules\/performance\/amount-of-indices\/"},"modified":"2022-02-08T09:32:36","modified_gmt":"2022-02-08T09:32:36","slug":"indexamount","status":"publish","type":"docs","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr-rules\/performance\/indexamount","title":{"rendered":"Entity should have a maximum of N indices"},"content":{"rendered":"\n<p>The index tables must always be re-ordered\/updated upon creating or changing an attribute that affects the index. Also, the database optimizer needs to pick the right index for a query, so multiple indices increase the chance the optimizer chooses the wrong one. <\/p>\n\n\n\n<p>When set to 3 for example, this rule finds all entities with more than 3 indices and makes it easy to review if the indices are distinctive and useful. <\/p>\n\n\n\n<p>Please note that, there is no maximum number of indices advised. It all depends on the amount of mutations to the entity and the <em>available disk space.<\/em><\/p>\n\n\n\n<p><strong>Noncompliant example:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"976\" height=\"518\" src=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/01\/image-55.png\" alt=\"\" class=\"wp-image-990\" srcset=\"https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/01\/image-55.png 976w, https:\/\/sdf-docs.clevr.com\/wp-content\/uploads\/2020\/01\/image-55-480x255.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 976px, 100vw\" \/><\/figure>\n\n\n\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\">\n<h2 class=\"wp-block-heading\">Additional resources on indices <\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>Mendix documentation: <a href=\"https:\/\/docs.mendix.com\/howto\/general\/community-best-practices-for-app-performance#3-index-best-practices\" target=\"_blank\" rel=\"noreferrer noopener\">Implement Community Best Practices for App Performance &#8211; Studio Pro 9 How-to&#8217;s | Mendix Documentation<\/a>. <\/li><li>A recommended read is this great blog by Martin Leppen, Mendix MVP at Cape Group: <a href=\"https:\/\/medium.com\/mendix\/performance-modelling-in-mendix-indexes-e5d6688d2701\" target=\"_blank\" rel=\"noreferrer noopener\">Performance modeling in Mendix \u2014 Indexes | by Martin Leppen | Mendix Community | Feb, 2022 | Medium<\/a>. Explaining everything you should know around indices.<\/li><\/ul>\n<\/div>\n","protected":false},"featured_media":0,"parent":95,"menu_order":14,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-233","docs","type-docs","status-publish","hentry"],"comment_count":0,"_links":{"self":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/233"}],"collection":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=233"}],"version-history":[{"count":5,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/233\/revisions"}],"predecessor-version":[{"id":2393,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/233\/revisions\/2393"}],"up":[{"embeddable":true,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/95"}],"next":[{"title":"Entity should have a maximum of N reference set associations","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr-rules\/performance\/referencesetamount","href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/755"}],"prev":[{"title":"Scheduled events should be executed with reasonable delay","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr-rules\/performance\/frequentscheduledevent","href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/227"}],"wp:attachment":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=233"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdoc_tag&post=233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}