On Wed, Apr 27, 2022 at 8:19 AM Mickael van der Beek <mickael.van.der.beek@xxxxxxxxx> wrote:
The last query does not finish after waiting for more than 15 minutes.
(The temporary view creation is very fast and required due to the same query in a CTE greatly reducing performance (by more than 5 min.) due to the optimisation barrier I'm guessing.)
How much over 15 minutes? 20 minutes doesn't seem that long to wait to get a likely definitive answer. But at the least show us the EXPLAIN without ANALYZE of it, that should take no milliseconds.
And what does it mean for something to take 5 minutes longer than "never finishes"?
(Also, putting every or every other token on a separate line does not make it easier to read)
Cheer,
Jeff