Subject RE: [firebird-support] Another compound index question
Author Leyne, Sean

 

 

Given the following WHERE clause

 

SubscriberId = :subid 

AND ProviderId = :provid

AND IsActive = 'Y'

AND Published = 'Y'

 

SubscriberId and ProviderId are integers and should be in a compound index.  But IsActive and Published are CHAR(1) fields where the only values are either 'Y' or 'N'.

 

Should IsActive and Published also be included in the index or is it better to leave them out?

 

<SL> what is the relationship between SubscriberID and ProviderID?

 

<SL> How unique are SubscriberID and ProviderID (# of values for each and how many rows would share the same SubscriberID or ProviderID)?

 

<SL> Is this a common search?

 

 

Dixoin