<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">On 3/14/2021 5:34 PM, Jorge Gustavo
      Rocha wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:9ad32dc1-6c0d-cfbf-f3e5-b65f43546917@di.uminho.pt">
      <pre class="moz-quote-pre" wrap="">Hi David,

Thanks for replication this issue. "Join attributes by location
(summary)" is definitely the best choice for this use case. It creates
the new layer in a few seconds. That's why I think we are missing
something (spatial indexes?, dependency graph?) in the expression engine.

There are anomalies in the data. That's almost the same with any dataset
we start working with <span class="moz-smiley-s1" title=":-)"><span>:-)</span></span>

Regards,

Jorge</pre>
    </blockquote>
    I tried a different approach, using aggregate, matching on the
    country name, thinking that would be faster than a spatial check. <br>
    I created a new field with the expression:<br>
    <blockquote>
      <pre class="moz-quote-pre" wrap="">aggregate( '03-03-2021','sum', "Confirmed", "Country_Region" ILIKE attribute(@parent,'SOVEREIGNT'))
</pre>
    </blockquote>
    Much to my surprise, this was slower than "Join attributes by
    location (summary)"<br>
    <pre class="moz-quote-pre" wrap="">
</pre>
  </body>
</html>