exoplatform / chat-application

Chat application
GNU Affero General Public License v3.0
37 stars 57 forks source link

missing index ? #87

Closed gpicavet closed 8 years ago

gpicavet commented 8 years ago

Hello,

I'm doing some load testing with 100 000 rooms and 7 500 000 messages (timestamp of messages are within the last 30 days).

query profile show that some read requests scan all the messages collection, because timestamp criteria is not selective enough.

When i add an index on roomId field, all is getting faster

thomasdelhomenie commented 8 years ago

I create a Jira for your feedback : https://jira.exoplatform.org/browse/CHAT-388. Feel free to comment. Thanks !

thomasdelhomenie commented 8 years ago

@grisha78 I added a PR to fix this issue : https://github.com/exo-addons/chat-application/pull/36 Feel free to comment if necessary.

gpicavet commented 8 years ago

The compound index performs better than single roomId like i did. My throughput has just grown by 20% ! Thanks

thomasdelhomenie commented 8 years ago

Good to hear :) The changes have been merged to the develop branch. This branch contains a bunch of improvements and is still compatible with Platform 4.3.0 (this is the version used in community.exoplatform.org). Thanks again for your feedback !