Published on InterSystems Developer Community (https://community.intersystems.com)

Home > Performant index on date field

Question
David Foard · Dec 26, 2019

Performant index on date field

Is there a way to get a good performing index on a date field? I have tried various date property indexes and the query plan is always in a pretty high range. Below are query plan result values I have observed:

   StartDate > '2019-12-01'  --cost = 699168
   StartDate = '2019-12-21'  --cost 70666
   StartDate between '2019-12-21' and '2019-21-28' --cost = 492058

 

The query plans above were for type %TimeStamp.

#Indexing #SQL #Caché

Source URL:https://community.intersystems.com/post/performant-index-date-field