Skip to content

Conversation

tim-hm
Copy link
Collaborator

@tim-hm tim-hm commented Feb 14, 2025

Soarchain are running weekly queries and their dataset is growing quickly. Because we're mid fligth there is insufficient time to correct the schemas and we need fixes for type coercion to landed. So as a hotfix, this adds optimised queries to manage runtime:

  1. Uses collection.estimatedDocumentCount() over costly aggregation pipeline
  2. Uses Dates to limit the Best Breaking Query to the week in question

We will aim to do the same for the remainder of their competition via this method and then revert once the competition is complete and we can roll out a better solution.

Soarchain are running weekly queries and their dataset is growing quickly. Because we're mid fligth there is insufficient time to correct the schemas and we need fixes for type coercion to landed. So as a hotfix, this adds optimised queries to manage runtime:

1. Uses `collection.estimatedDocumentCount()` over costly aggregation pipeline
2. Uses Dates to limit the `Best Breaking Query` to the week in question

We will aim to do the same for the remainder of their competition via this method and then revert once the competition is complete and we can roll out a better solution.
@tim-hm tim-hm force-pushed the hotfix/soarchain-queries branch from 0b905d3 to e58b617 Compare February 14, 2025 16:42
Copy link
Member

@psofiterol psofiterol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good AFAICT 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants