Don't understand DateTime search index in GraphQL

How I understand it, I am thinking that the index should be based on the normal use cases in range of data asked for.

If my queries usually ask for data within a month range then I would be better off doing the month index. If the normal use is to see data in chunks of days then day would be the best index, etc.

I understand that index works like dictionary guide words. The index quickly divides data in chunks. If I apply a month index and then apply a gt function filter. It will get the chunk of data around that index. And then do additional process that chunk of data to find the ones that match the filter. Then it will get all of the chunks matching greater than that index and append it to the data.

The index helps narrow down the size of the chunk that needs to be processed without the index.

Another way to look at it is, the closer your data is together the closer your indexes may need to be.

1 Like