-
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Aggiunta indice per idintervento in co_righe_documenti
- Loading branch information
1 parent
0db3ef4
commit 8706efd
Showing
1 changed file
with
3 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8706efd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perché aggiungere un indice, e proprio appena prima della release?
8706efd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E' collegato al commit 15d27d4 che introduce una nuova colonna nelle attività, il riferimento al numero di fattura, però dopo molte ottimizzazioni la vista rimaneva molto lenta. Indicizzando l'id intervento nelle righe fatture la vista torna molto veloce. Non abbiamo aggiunto altri indici, ad esempio su idcontratto, idpreventivo, ecc perché per il momento non ci sono viste che lo necessitino. @lucasalva87 dovreva forse specificare meglio nel commento del commit il motivo dell'aggiunta indice
8706efd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In questo caso poteva essere sensato inserire la foreign key relativa, che dovrebbe prevedere in automatico l'aggiunta di un indice?
Infatti mi chiedevo perché proprio per gli interventi e non per il resto.
8706efd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sarebbe corretto anche la foreign key, è vero. Senza il "ON DELETE CASCADE" però, perché se elimino un intervento fatturato non devo modificare le righe di fatture già emesse