From 90efeacbc079bb87d44f4ed4bca4d9069ed06eeb Mon Sep 17 00:00:00 2001
From: Helmut Grohne <helmut@subdivi.de>
Date: Sun, 12 Jun 2016 07:52:28 +0200
Subject: multiarchanalyze: speed up on sqlite3 3.8.7.1

Since all users of archdepcandidate run the results through "exists()"
or "group by", "union" vs "union all" does not make any difference to
the results.

On the performance side however, it avoids a b-tree merge getting the
maforeign_candidate query down from hours to seconds.
---
 multiarchanalyze.sql | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'multiarchanalyze.sql')

diff --git a/multiarchanalyze.sql b/multiarchanalyze.sql
index 6b26ecd..95ebd7d 100644
--- a/multiarchanalyze.sql
+++ b/multiarchanalyze.sql
@@ -45,7 +45,7 @@ CREATE VIEW archdepcandidate AS
 			OR p1.architecture = 'all'
 			OR p2.architecture = 'all'
 			OR p2.architecture = d.archqual)
-	UNION
+	UNION ALL
 	SELECT p1.id AS dependerid, p2.id AS dependeeid
 	FROM package AS p1, depends AS d, provides AS r, package AS p2
 	WHERE p1.id = d.pid
-- 
cgit v1.2.3

