Whether or not an index improves performance depends on:
1. The number of rows in the table. If the table has less than a few thousand rows, no index may be needed other than to guarantee uniquneness (unique index or index that is created by defining the primary key).
2. Whether or not DB2 actually uses the index. This may depend on whether DB2 has accurate statistics on the data (from runstats command).
Assuming this is a large table (more than 100,000 rows), and all predicates that query the table have either parent or createdate (as you stated), then I would recommend the following indexes. You must create these objects in the order specified. Note the use of the INCLUDE in the first index (read the SQL Reference Vol 2 for create index for an explanation of INCLUDE).
I have provided 2 options for index TABLE_NAME_IX1. The second option enables "index only" access (the table does not need to be accessed on a select), but the index size is larger.
CREATE TABLE TABLE_NAME ( PARENT BIGINT NOT NULL , CHILD BIGINT NOT NULL , CREATEDATE TIMESTAMP NOT NULL WITH DEFAULT ) ;
CREATE UNIQUE INDEX PK_TABLE_NAME ON TABLE_NAME (PARENT, CHILD) INCLUDE (CREATEDATE );
ALTER TABLE TABLE_NAME ADD CONSTRAINT PK_TABLE_NAME PRIMARY KEY(PARENT, CHILD);
CREATE INDEX TABLE_NAME_IX1 ON TABLE_NAME (CREATEDATE);
CREATE INDEX TABLE_NAME_IX1 ON TABLE_NAME (CREATEDATE, PARENT, CHILD);
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390