#novu.Jobs queries taking too long

1 messages · Page 1 of 1 (latest)

verbal cargoBOT
#

@honest moth, you just advanced to level 1!

plucky cometBOT
#

Hi @honest moth, I'm an AI assistant for Novu. While a team member reviews this question, I'll see if I can find relevant sources for your question.

#

Answer

Regarding the performance issues with novu.jobs queries taking a long time, one possible reason could be related to the database setup, particularly the indexes. A forum post discussed a similar issue where the MongoDB jobs table had a high number of records, and it was found that creating missing indexes on the job and message tables significantly improved performance (1) .

If you're experiencing slow query times, consider checking to ensure all necessary indexes are in place. Specifically, for the jobs table, indexes on _environmentId, _subscriberId, _organizationId, and _parentId were mentioned as beneficial. Additionally, setting up the expireAt index on collections like executionDetails and notifications could also be helpful in managing data expiration and possibly improving query performance.

Please ensure to review and adjust your database indexing strategy to see if it aligns with the improvements suggested in the community discussion.