This document describes the steps for adding the index on conversation manager DB to improve the reporting connector performance
Steps
-
SSH on the target server
-
To connect to your database, create a MongoDB® client container. Run following command
kubectl run --namespace ef-external mongo-mongodb-client --rm --tty -i --restart='Never' --env="MONGODB_ROOT_PASSWORD=$MONGODB_ROOT_PASSWORD" --image docker.io/bitnami/mongodb:6.0.2-debian-11-r1 --command -- bash k exec -it mongo-mongodb-client -n ef-external -- bash mongosh admin --host "mongo-mongodb" use conversation-manager_db -
Run
use conversation-manager_dbcommand and add the following indexes onconversationscollection.db.conversation.createIndex( { "endTime": 1 }) db.CustomerTopicEvents.createIndex( { "customer._id": 1 }) -
A add the following indexes on
CustomerTopicEventscollection.db.CustomerTopicEvents.createIndex( { "cimEvent.name": 1 }) db.CustomerTopicEvents.createIndex( { "cimEvent.type": 1 }) db.CustomerTopicEvents.createIndex( { "customerId": 1 }) db.CustomerTopicEvents.createIndex( { "topicId": 1 }) db.CustomerTopicEvents.createIndex( "recordCreationTime":1}) db.CustomerTopicEvents.createIndex({ "cimEvent.data.channelSession.channel.channelConfig.routingPolicy.routingMode": 1 }) db.CustomerTopicEvents.createIndex("cimEvent.data.body.type: 1 }) db.CustomerTopicEvents.createIndex({"cimEvent.data.body.wrapups": 1 }) -
Run
use state-events-logger_cx_dbcommand and add indexes onagentStateChanheEventscollection.db.agentStateChangeEvents.createIndex( { "name": 1 }) db.agentStateChangeEvents.createIndex({ "data.agentStateChanged": 1 }) db.agentStateChangeEvents.createIndex({ "data.agentPresence.stateChangeTime": 1 }) db.agentStateChangeEvents.createIndex({ "data.agentPresence.agentMrdStates": 1 }) db.agentStateChangeEvents.createIndex({ "stateChangeTime": 1 }) db.agentStateChangeEvents.createIndex({"data.agentPresence.state.name": 1 })