winterhazel commented on code in PR #11443:
URL: https://github.com/apache/cloudstack/pull/11443#discussion_r4207371130


##########
engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade42210to42300.java:
##########
@@ -89,4 +90,10 @@ protected void 
updateJsInterpretationEnabledFields(Connection conn, String encry
             logger.warn("Error while decrypting configuration 
'js.interpretation.enabled'. The configuration may already be decrypted.");
         }
     }
+
+    private void addIndexes(Connection conn) {
+        DbUpgradeUtils.addIndexWithNameIfNeeded(conn, "event", 
"i_event__multiple_columns_for_generic_search",
+                "account_id", "domain_id", "archived",  "display", 
"resource_type", "resource_id", "start_id", "type", "level",
+                "created", "id");

Review Comment:
   > do we need the index to cover all these columns?
   
   @JoaoJandre not really. Initially, I created a single index to speed up all 
queries `listEvents` could possibly make. I made some some new tests, and it 
seems that creating a few smaller ones instead of a big one already does the 
job. I'll change the index.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to