Skip to content

perf(chartData): added indexes for dailyEvents collection#546

Merged
slaveeks merged 8 commits intomasterfrom
feat/add-daily-events-indexes
Nov 4, 2025
Merged

perf(chartData): added indexes for dailyEvents collection#546
slaveeks merged 8 commits intomasterfrom
feat/add-daily-events-indexes

Conversation

@slaveeks
Copy link
Copy Markdown
Member

    /**
     * Compose options for find method
     * @type {{groupingTimestamp: {$gt: number}}}
     */
    const options = {
      groupingTimestamp: {
        $gt: since,
      },
    };

    /**
     * Add eq check if groupHash was passed
     */
    if (groupHash) {
      options.groupHash = {
        $eq: groupHash,
      };
    }

    let dailyEvents = await this.getCollection(this.TYPES.DAILY_EVENTS)
      .find(options)
      .toArray();

Added indexes to DailyEvents for queries to find ChartData

@slaveeks slaveeks requested review from e11sy and neSpecc October 10, 2025 19:31
@slaveeks slaveeks merged commit 366a7e7 into master Nov 4, 2025
6 checks passed
@slaveeks slaveeks deleted the feat/add-daily-events-indexes branch November 4, 2025 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants