Compound Index
Posted in 1995
I read Informix manual and Sally's article about only first column in a compound index is used in a query search. I am not sure how would Informix uses a compound index for a query as follows - Index columns ((SBM_PROC_CNTR_NUM ASC, YEAR_NUMBER ASC, SCANNED_JULIAN_DT ASC, CAPTURE_COMP_CD ASC, CONTAINER_SEQ_NUM ASC, SEQUENCE_NUMBER ASC) Query: select <needed columns> from submission where sbm_proc_cntr_num = ?? and year_number = ?? and scanned_julian_dt = ?? and capture_comp_cd = ?? and container_seq_num = ?? and sequence_number = ?? Would Informix use all columns in the index to find the row or just uses the first column (sbm_proc_cntr_num) ? First column (sbm_proc_cntr_num) does not have high distribution on data value. Thanks for any advice !