Skip to content

Commit ce263fd

Browse files
committed
feat: ottimizzazione indici articoli
1 parent f6a2bc2 commit ce263fd

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

update/2_9_3.sql

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,4 +217,18 @@ WHERE
217217
HAVING
218218
2=2
219219
ORDER BY
220-
`name`' WHERE `zz_modules`.`name` = 'Marche';
220+
`name`' WHERE `zz_modules`.`name` = 'Marche';
221+
222+
-- Indici per categoria e sottocategoria
223+
ALTER TABLE `mg_articoli` ADD INDEX `idx_id_categoria` (`id_categoria`);
224+
ALTER TABLE `mg_articoli` ADD INDEX `idx_id_sottocategoria` (`id_sottocategoria`);
225+
226+
-- Indici per marca e modello
227+
ALTER TABLE `mg_articoli` ADD INDEX `idx_id_marca` (`id_marca`);
228+
ALTER TABLE `mg_articoli` ADD INDEX `idx_id_modello` (`id_modello`);
229+
230+
-- Indice per iva di vendita
231+
ALTER TABLE `mg_articoli` ADD INDEX(`idiva_vendita`);
232+
233+
-- Rimozione indice doppio
234+
ALTER TABLE `mg_articoli` DROP INDEX `id_combinazione`;

0 commit comments

Comments
 (0)