compression external-link-icon-enabled" data-v-39a288b8><div><h1 id="rules-compressions" tabindex="-1">Rules compressions <a class="header-anchor" href="#rules-compressions" aria-label="Permalink to &quot;Rules compressions&quot;">​</a></h1><p>Database are great on optimizing queries, but sometimes cancancan builds <code>joins</code> that might lead to slow performance. This is why your rules are optimized automatically at runtime. There are a set of &quot;rules&quot; to optimize your rules definition and