From 5786b7bf228df7b6b3af9338b91936b487a32833 Mon Sep 17 00:00:00 2001 From: Fabian Posch Date: Sat, 1 Feb 2025 21:36:46 +0100 Subject: [PATCH] another dbase optimization --- src/actsim_agent/downloader.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/actsim_agent/downloader.cpp b/src/actsim_agent/downloader.cpp index 6d1cc75..3817764 100644 --- a/src/actsim_agent/downloader.cpp +++ b/src/actsim_agent/downloader.cpp @@ -140,11 +140,11 @@ bool Downloader::fetch_tasks(size_t n) { "JOIN " " actsim_passes ap ON ap.sim_configs = sc.artifact " "LEFT JOIN " - " sim_outputs so ON sc.id = so.sim_config " + " sim_outputs so ON sc.has_reference = so.sim_config " "JOIN " " jobs j ON ap.job = j.id " "WHERE " - " (so.id IS NULL OR so.part_status = 'not_started') " + " (so.part_status IS NULL OR so.part_status = 'finished') " " AND ap.id IN ( " " SELECT ap_dep.id " " FROM actsim_passes ap_dep " @@ -156,14 +156,14 @@ bool Downloader::fetch_tasks(size_t n) { " AND dep.pass_status != 'finished' " " ) " " ) " - " AND (sc.has_reference IS NULL OR " - " EXISTS (" - " SELECT 1 " - " FROM sim_outputs out " - " WHERE out.sim_config = sc.has_reference " - " AND out.part_status = 'finished' " - " ) " - " ) " + // " AND (sc.has_reference IS NULL OR " + // " EXISTS (" + // " SELECT 1 " + // " FROM sim_outputs out " + // " WHERE out.sim_config = sc.has_reference " + // " AND out.part_status = 'finished' " + // " ) " + // " ) " // "ORDER BY " // " ap.pass_status = 'in_progress' DESC, " // " j.time_added ASC "