Indexing strategy
Posted in 1993
Hi Informix Gurus, this question may well be a FAQ, but I'm rather new to this group and haven't read about it before. BTW: Is there a FAQ somewhere? I have several large tables under ONLINE 4.0 (soon to be upgraded to 4.1), whose structure is similar to: patient_nr INTEGER, procedure_nr INTEGER, proc_date DATE, result SMALLFLOAT There can be only one procedure of the same type per day for one patient, so the primary key is composed of patient_nr, procedure_nr and proc_date, and I defined a composite unique index on those three columns. Since there will be many queries on a per-patient, per-procedure or per-date basis, I also defined duplicate indices on each one of these rows. Performance is important, and the tables are growing rapidly; one of them will soon have over a million rows! I have a feeling that my indexing strategy is redundant, and that those extra duplicate indices are wasting precious space, but I am afraid that I might lose query performance when I drop them. The inserts are not a problem, since they are done by a background process. The question is: Will INFORMIX be able to use the composite index to query columns that are part of it with the same speed as with the additional indices that consist only of the specific column? Thanks for any help, Richard -- +----------------------------+-------------------------------------------+ | Dr. Richard Spitz | INTERNET: spitz@ana.med.uni-muenchen.de | | EDV-Gruppe Anaesthesie | Tel : +49-89-7095-3421 | | Klinikum Grosshadern | FAX : +49-89-7095-8886 | | Munich, Germany | | +----------------------------+-------------------------------------------+