<div dir="ltr"><div class="gmail_quote"><div> In case someone else is having the same problem. The problem was not that the spatial index was missing.</div><div><br></div><div>The requested extent covered whole Europe and returned a tremendous amount of rows  so a spatial index did not help.</div><div>The large extent was because the metatiling was set to 15x15. So one solution was to reduce the metatiling to 4x4.</div><div><br></div><div>We also manage to get decent performance with the 15x15 metatiling. We divided the slow layer into two zoom-levels and modified the query to return fewer rows in the smaller scales. In the smaller scales we used a non spatial combined index. In the higher scales we used a partial spatial index.</div><div><br></div></div></div>