Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMPROVE][Performance] Add new database indexes to improve data query performance #17839

Merged
merged 6 commits into from Jun 16, 2020

Conversation

rodrigok
Copy link
Member

@rodrigok rodrigok commented Jun 6, 2020

Proposed changes

Add some missing indexes on:

  • Livechat Visitors
  • Messages
  • Rooms
  • Subscriptions
  • Sessions
  • _Trash

Issue(s)

How to test or reproduce

Screenshots

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves a current function)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Hotfix (a major bugfix that has to be merged asap)
  • Documentation Update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have added necessary documentation (if applicable)
  • Any dependent changes have been merged and published in downstream modules

Changelog

Further comments

@rodrigok rodrigok added this to the 3.4.0 milestone Jun 6, 2020
@rodrigok rodrigok marked this pull request as ready for review June 9, 2020 11:55
Copy link
Member

@sampaiodiego sampaiodiego left a comment

Choose a reason for hiding this comment

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

we'll need a migration to deal with updated indexes..

indexes changed to sparse didn't change without a migration and others like this got "duplicated" (a new index was created but the old one still exists)

app/models/server/models/_BaseDb.js Outdated Show resolved Hide resolved
app/models/server/models/Rooms.js Outdated Show resolved Hide resolved
rodrigok and others added 2 commits June 16, 2020 17:21
Co-authored-by: Diego Sampaio <chinello@gmail.com>
@sampaiodiego sampaiodiego merged commit 12c11f2 into develop Jun 16, 2020
@sampaiodiego sampaiodiego deleted the new-indexes branch June 16, 2020 21:38
ggazzo added a commit that referenced this pull request Jun 17, 2020
…o threads-alpha

* 'threads-alpha' of github.com:RocketChat/Rocket.Chat: (23 commits)
  [IMPROVE][Performance] Add new database indexes to improve data query performance (#17839)
  [FIX] Undesirable message updates after user saving profile (#17930)
  Remove unused accounts-js integration (#17921)
  [IMPROVE] Don't send emails to online users and remove delay when away/idle (#17907)
  [IMPROVE] Split NOTIFICATIONS_SCHEDULE_DELAY into three separate variables (#17669)
  correct outdated dev start info
  [IMPROVE] Rewrite Federation Dashboard (#17900)
  [FIX] Duplicated placeholderaceholder  (#17898)
  Wrap components with React.memo (#17899)
  [FIX] Some Login Buttons disappear after refreshing OAuth Services (#17808)
  Change some components' location (#17893)
  [IMPROVE] Rewrite admin sidebar in React (#17801)
  Always initialize CIRCLE_BRANCH env var on CI (#17874)
  [NEW] Blocked Media Types setting (#17617)
  [FIX] Reorder hljs (#17854)
  [FIX] SAML LogoutRequest sending wrong NameID (#17860)
  [FIX] Apps room events losing data (#17827)
  [FIX] Importers progress sending too much update events to clients (#17857)
  [FIX] Omnichannel message link is broken in email notifications (#17843)
  [FIX] Logic for room type was inverted in edit panel (#17851) (#17853)
  ...
ggazzo added a commit that referenced this pull request Jun 18, 2020
…apps_rewrite* 'develop' of github.com:RocketChat/Rocket.Chat: (28 commits) [IMPROVE] Performance editing Admin settings (#17916)  [IMPROVE] React hooks lint rules (#17941)  [FIX] StreamCast stream to server only streamers (#17942)  [FIX] Profile save button not activates properly when changing the username field (#16541)  [FIX] Outgoing webhook: Excessive spacing between trigger words (#17830)  [FIX] Links being escaped twice leading to visible encoded characters (#16481)  [NEW][API] New endpoints to manage User Custom Status `custom-user-status.create`, custom-user-status.delete` and `custom-user-status.update` (#16550)  [FIX] Message action popup doesn't adjust itself on screen resize (#16508)  [FIX] Not possible to translate the label of custom fields in user's Info (#15595)  [FIX] Close the user info context panel does not navigate back to the user's list (#14085)  [FIX] Missing pinned icon indicator for messages pinned (#16448)  Chatpal: limit results to current room (#17718)  Do not build Docker image for fork PRs (#17370)  [IMPROVE] Use REST for DDP calls by default (#17934)  [IMPROVE] Add rate limiter to UiKit endpoints (#17859)  LingoHub based on develop (#17796)  [IMPROVE] Change default upload settings to only block SVG files (#17933)  Update Dockerfile to not depend on custom base image (#17802)  [IMPROVE][Performance] Add new database indexes to improve data query performance (#17839)  [FIX] Undesirable message updates after user saving profile (#17930)  ...
@sampaiodiego sampaiodiego mentioned this pull request Jun 30, 2020
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.

None yet

3 participants