View Revisions: Issue #870
Summary | 0000870: Optimize Document Log cleanup | ||
---|---|---|---|
Revision | 2017-10-23 12:14 by rijkr | ||
Description | IST: Document Log cleanup take too much time for large data sets. SOLL: Use SQL DELETE statements, instead of removing individual JPA entity objects. Also note that PostgreSQL automatically creates indexes on primary keys and unique constraints, but not on the referencing side of foreign key relationships. Therefore, define JPA indexes on foreign-key columns, so the right PostgreSQL schema DDL is generated. Note: JPA/Hibernate generated DDL schema for PostgreSQL differs from the DDL generated for Apache Derby. The DDL for the latter *does* automatically create indexes for foreign key columns. https://stackoverflow.com/questions/970562/postgres-and-indexes-on-foreign-keys-and-primary-keys https://dba.stackexchange.com/questions/37034/very-slow-delete-in-postgresql-workaround#37095 https://stackoverflow.com/questions/406294/left-join-vs-left-outer-join-in-sql-server |
||
Revision | 2017-09-26 20:42 by rijkr | ||
Description | IST: On high productivity systems Document Log cleanup involves the (cascaded) delete of many database rows. SOLL: Commit in restricted scope. The scope is already defined in configuration item "db.batch.commit-chunk-size". |