Re: Constraint indices
Posted in 2007
bozon wrote: > Art Said: > >>Next, IDS will only use an exact index for a constraint index. That makes >>sense. Yes, IDS can look up any appt_id in the compound index created for >>the primary key, but that's not unique on appt_id in theory (or I suspect in >>practice) so it's neither ideal nor efficient for the kind of lookups that >>IDS will need to perform to maintain the FOREIGN KEY constraint. I >> >>Art S. Kagel > > > Since appt_id is a foreign key it isn't supposed to be unique. Bozon is correct, of course, but my very unclear meaning was that in a singleton index there would be only one node with each appt_id in it in the index tree with an inversion list of rowids containing that value attached. That will tend to be more efficient, as long as the number of rows with a single key value is not too skewed, than traversing a much deeper index tree with multiple nodes for most appt_id values each with a different value for the other column. The singleton index tree itself will be more efficient. Bozon's other point, that IBM COULD code to allow such indexes to be used, is valid, and interesting. Art S. Kagel