deegree / deegree3

Official deegree repository providing geospatial core libraries, data access and advanced OGC web service implementations
https://www.deegree.org
GNU Lesser General Public License v2.1
146 stars 99 forks source link

Missing Index on parentFk #1298

Open 4DFuchs opened 2 years ago

4DFuchs commented 2 years ago

Hi, I am generating the DDL with the DDL-Creator from Deegree-Project like this

final MappedAppSchema mappedSchema = getMappedSchema(new PostGISDialect("2.0.0"));

final String[] createStmts = DDLCreator.newInstance(mappedSchema, getPostGISDialect()).getDDL();

But I am confused, because the Indices for ForeignKeys are missing. This bug has big performance issue when deleting or selecting rows in the database.

In my opinion the index should be generated after the call of createJoinedTable.

tfr42 commented 2 years ago

The deegree CLI and its underlying API provides functions to generate SQL DDL scripts based on GML application schemas. Currently there is no function or option available to enable the creation of database indexes by default. Users are advised to manually add indexes appropriate to the usage scenario.

You may consider to post your feedback also to issue #977 which is about performance improvements for SQLFeatureStore based WMS.

We appreciate any contribution to the deegree code base which adds this kind functionality.