Subject | RE: [firebird-support] Looking for advice on indexes |
---|---|
Author | Leyne, Sean |
Post date | 2013-05-03T19:42:05Z |
Marcin,
Yes, it should be SITE_ID
What is the selectivity/distribution of values in your table?
Sean
> W dniu 03.05.2013 19:18, Leyne, Sean pisze:...
> > For this query, a DESCENDING compound index with the ID andSorry, typo!
> WORK_DATE would be best.
> >
> Are you sure that it should be ID not SITE_ID?
Yes, it should be SITE_ID
> I've created DESCENDING index for SITE_ID, WORK_DATE and it looks reallyThat is not what I would expect. (It should have read 1 row per SITE_ID to confirm that the "max" value was valid for the candidate row).
> fast despite fact that all records have been read (according to IB Expert
> Performance Analisys).
What is the selectivity/distribution of values in your table?
Sean