IBM Data Management Community Connect with Db2, Informix, Netezza, open source, and other data experts to gain value from your data, share insights, and solve problems. Join / Log in
Assuming the secondary index is on the root segment AND the search fields are sourced from data in the root segment, you can map a single virtual table that can use either the root sequence field or secondary index based on search criteria specified in the SQL WHERE clause. To do this, you will need to extract the new DBD source into DVM so DVM is aware of the new secondary index. You will also need to extract new PSB source containing a regular PCB for the database and a separate PCB with a PROCSEQ for the secondary index.When querying the new table after bringing in the new DBD and PSB, DVM will select either the regular PCB or secondary index PCB based on the SQL WHERE clause for the table. If the WHERE clause can be used to create a qualified SSA for the secondary index, the secondary index will be used. Otherwise, the regular PCB without a PROCSEQ will be used.