From a78d46b0df384a60d5277f5cead312da8019ced1 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sun, 14 Jul 2019 20:23:29 +0200 Subject: Revert "bin/get-assignment: accellerate query (?) by using temporary table instead of "WHERE EXISTS (SELECT ...)"" This reverts commit ffe16b27cc7a8af56837c437943cdec5dc179e68. The query is much faster in the old way. --- bin/get-assignment | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'bin/get-assignment') diff --git a/bin/get-assignment b/bin/get-assignment index 44cfe66..9dcb600 100755 --- a/bin/get-assignment +++ b/bin/get-assignment @@ -219,8 +219,6 @@ next_building=$( printf ');\n' done - mysql_query_generate_packages_with_pending_dependencies - printf 'INSERT IGNORE INTO `considered_build_assignments` (`id`)' printf ' SELECT `build_assignments`.`id`' printf ' FROM `build_assignments`' @@ -242,9 +240,6 @@ next_building=$( printf ')' printf ' LEFT' mysql_join_package_sources_toolchain_order - printf ' LEFT JOIN `packages_with_pending_dependencies`' - printf ' ON `packages_with_pending_dependencies`.`builder_architecture`=`build_command_architectures`.`id`' - printf ' AND `packages_with_pending_dependencies`.`build_assignment`=`build_assignments`.`id`' printf ' WHERE (' printf '`build_assignments`.`is_blocked` IS NULL' if [ -n "${requested}" ]; then @@ -254,7 +249,8 @@ next_building=$( fi printf ') AND (' mysql_query_is_part_of_loop '`build_assignments`.`id`' - printf ' OR `packages_with_pending_dependencies`.`build_assignment` IS NULL' + printf ' OR NOT ' + mysql_query_has_pending_dependencies '`build_command_architectures`.`id`' '`build_assignments`.`id`' printf ' OR `toolchain_order`.`pkgbase` IS NOT NULL' printf ')' printf ' AND `binary_packages_in_repositories`.`repository`=%s' \ -- cgit v1.2.3-70-g09d2