refactor: refs #5586 Optimized SQL negativeBases #2007

Merged
guillermo merged 12 commits from 5586-optimizeNegativeBases into dev 2024-02-20 06:28:05 +00:00
1 changed files with 4 additions and 1 deletions
Showing only changes of commit 92261ebe0d - Show all commits

View File

@ -9,7 +9,10 @@ BEGIN
* @return tmp.ticketAmount (ticketFk, taxableBase, tax, code)
* @return tmp.ticketTax (ticketFk, pgcFk, taxableBase, rate, code) Impuesto desglosado para cada ticket.
*/
CREATE OR REPLACE TEMPORARY TABLE tmp.addressCompany
-- Mantengo el drop porque si no da error en los tests de back de salix
-- Table 'addressCompany' was locked with a READ lock and can't be updated'
DROP TEMPORARY TABLE IF EXISTS tmp.addressCompany;
CREATE TEMPORARY TABLE tmp.addressCompany
(INDEX (addressFk, companyFk))
ENGINE = MEMORY
SELECT DISTINCT t.addressFk, t.companyFk