Performance Tips
Clean up the database
- Use the Database Cleanup utility to remove obsolete data.
Optimize the DB2 database
- Use the db2 reorgchk utility on tables that are frequently
updated.
- Use the db2 runstats utility on tables that are frequently
updated.
Create additional indexes
- Create additional indexes to reduce the time it takes to locate rows in
tables. The database uses indexes for its most frequently accessed columns.
You can create an index for any column that is not listed. Note that while
an index may improve performance, it also takes up more space in the
database. The default Commerce Suite indexes are described in "Database
indexes."
Keep a shallow object type hierachy
- 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
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
hierarchy, the more tables that must be joined together. And database joins
are very expensive.
Avoid Expensive Queries
- Some queries can, and should, be avoided. Two examples:
-
SELECT DISTINCT nonIndexedCol FROM
HugeTable
-
SELECT * FROM HugeTable ORDER BY
nonIndexedColumn
BACK