Archive

Archive for January, 2011

Don’t Let Your Object Hierarchy Get Too Deep

January 31, 2011 2 comments

For performance reasons, it is best to keep your object hierarchy as shallow as possible. The reason for this is that each level of the object hierarchy is stored in a separate table in the database. In order to manipulate an object, the Documentum server must join that object type’s tables with the tables of all of the other object types in the hierarchy above it. The more levels in your hirearchy, the more tables that must be joined together. And database joins are very expensive.

For example the following object hierarchy must do 4 joins (one for each level) when you query on plant_maintenance_report.

                dm_document
                                    |
                                    |  
                   Report
                                    |
                                    |
              technical_report
                                    |
                                    |
          plant_maintenance_report

It is advisable to try to collapse this hierarchy. The typical way to do this is to add all the custom attributes to the report object and add an extra attribute that identifies the type of report. You can still query for plant maintenance reports by using a where clause like this: where report_type = 'Plant Maintenance Report'. The resulting type hierarchy will look like this.

                 dm_document
                                    |
                                    |  
                   Report
%d bloggers like this: