I created a table of the object type 'Document'. This table contains multiple sub-types of Document (example: Recipe, Publication, Contract). These sub-types all contain common attributes (id, title, file size) but often contain additional attributes (i.e. stock number). I created indexes on the commonly searched common attributes, but also would like to create indexes on commonly searched sub-type specific attributes.
For example, I created an index for Title of the Documents table:
CREATE INDEX i_title
ON Documents (Title);
I would like to do something similar to the following:
CREATE INDEX i_stock_number
ON DOCUMENTS d (Stock_Number) WHERE VALUE(d) IS OF TYPE(Publication);
or possibly
CREATE INDEX i_stock_number
ON DOCUMENTS (TREAT(DOCUMENTS AS Publication).Stock_Number);
Could you help me determine how to create the indexes for sub-type specific attributes?
Thank you for your time.