JOINED inheritance strategy
RepositoryFile
uses TABLE_PER_CLASS
inheritance strategy and that's causing performance problems when querying (e.g. Dataset#files
problem described in genesys-server#509 (closed)).
Simple testing (comments in genesys-pgr/genesys-server!535) shows that using JOINED inheritance results in much better performance.
Update code and liquibase-changeLog.yml
for use of @Inheritance(strategy = InheritanceType.JOINED)
in RepositoryFile
class.
Database migration must include:
- Copy data from
repository_image
torepository_file
- Drop unnecessary columns.
- Copy data from
repository_document
torepository_file
- Drop unnecessary columns.
I hope that primary key id
is unique across these tables.
Edited by Matija Obreza