On Sun, Mar 07, 2021 at 03:51:05PM +0100, Michel SALAIS wrote: > > Have you tried to use EXPLAIN ANALYZE at least? > > It could give valuable information about why this is occurring. +1, and more generally please follow https://wiki.postgresql.org/wiki/Slow_Query_Questions.