From 36d5081f9d96eb990f8fa73d6786b55700d9b33a Mon Sep 17 00:00:00 2001 From: Niclas Zimmermann Date: Fri, 14 Jun 2013 14:37:22 +0200 Subject: [PATCH] =?utf8?q?Unn=C3=B6tiger=20JOIN=20auf=20taxkeys?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Hier werden keine Steuern berücksichtigt. Es gab zwar einen Join auf die Tabelle taxkeys, aber es wurden keine Daten ausgelesen. --- SL/RP.pm | 7 ------- 1 file changed, 7 deletions(-) diff --git a/SL/RP.pm b/SL/RP.pm index 095f7581c..c4a95039b 100644 --- a/SL/RP.pm +++ b/SL/RP.pm @@ -531,13 +531,6 @@ sub get_accounts_g { FROM acc_trans ac LEFT JOIN chart c ON (c.id = ac.chart_id) LEFT JOIN ar ON (ar.id = ac.trans_id) - LEFT JOIN taxkeys tk ON (tk.id = ( - SELECT id FROM taxkeys - WHERE chart_id = ac.chart_id - AND startdate <= COALESCE(ar.deliverydate,ar.transdate) - ORDER BY startdate DESC LIMIT 1 - ) - ) WHERE ac.trans_id IN (SELECT DISTINCT trans_id FROM acc_trans WHERE 1=1 $subwhere) GROUP BY c.$category -- 2.20.1