Skip to content

Commit

Permalink
clean comment
Browse files Browse the repository at this point in the history
Signed-off-by: Etienne <etiennehomer@gmai.com>
  • Loading branch information
Etienne committed Feb 3, 2024
1 parent 123b6d7 commit 4f46156
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ public interface GeneratorModificationRepository extends JpaRepository<Generator
@EntityGraph(attributePaths = {"reactiveCapabilityCurvePoints"}, type = EntityGraph.EntityGraphType.LOAD)
List<GeneratorModificationEntity> findAllWithReactiveCapabilityCurvePointsByIdIn(List<UUID> ids);

// To disable trigger is a practice and maybe in production, the postgres user of the application will not be allowed to change the schema.
// To disable trigger is a bad practice and in production, the postgres user of the application will not be allowed to change the schema.
// This code is just an example of how fixing the following problem :
// When we want to delete a tabular modification, we need to execute a delete statement with thousands of ids on the 'modification' table.
// But as the 'modification' table is referenced up to now by 40 foreign key constraints, all the triggers make the delete statement execution quite slow (about 3-4 seconds).
// But as the 'modification' table is referenced up to now by 40 foreign key constraints (it will be about 300 later), all the triggers make the delete statement execution quite slow (about 3-4 seconds).
@Override
@Modifying
@Query(value = "BEGIN;" +
Expand Down

0 comments on commit 4f46156

Please sign in to comment.