https://forge.softwareheritage.org/source/swh-scheduler.git
Revision e051b320e4050bdc75502bf23de8b5d53d368809 authored by Nicolas Dandrimont on 09 December 2021, 13:54:09 UTC, committed by Nicolas Dandrimont on 09 December 2021, 14:16:06 UTC
When using ``insert into <...> select <...>``, PostgreSQL disables
parallel querying. Under some circumstances (in our large production
database), this makes updating the scheduler metrics take a (very) long
time.

Parallel querying is allowed for ``create table <...> as select <...>``,
and doing so restores the small(er) runtimes for this query (15 minutes
instead of multiple hours). To use that, we have to turn the function
into plpgsql instead of plain sql.
1 parent a8edbdb
History
Tip revision: e051b320e4050bdc75502bf23de8b5d53d368809 authored by Nicolas Dandrimont on 09 December 2021, 13:54:09 UTC
Use a temporary table to update scheduler metrics
Tip revision: e051b32
File Mode Size
_static
_templates
.gitignore -rw-r--r-- 24 bytes
Makefile -rw-r--r-- 39 bytes
cli.rst -rw-r--r-- 887 bytes
conf.py -rw-r--r-- 43 bytes
index.rst -rw-r--r-- 5.4 KB
simulator.rst -rw-r--r-- 3.0 KB

back to top