vishesh92 commented on code in PR #9547:
URL: https://github.com/apache/cloudstack/pull/9547#discussion_r1726922886
##########
server/src/main/java/com/cloud/api/query/QueryManagerImpl.java:
##########
@@ -1447,13 +1447,18 @@ private Pair<List<Long>, Integer>
searchForUserVMIdsAndCount(ListVMsCmd cmd) {
}
if (keyword != null) {
- userVmSearchBuilder.and().op("keywordDisplayName",
userVmSearchBuilder.entity().getDisplayName(), Op.LIKE);
- userVmSearchBuilder.or("keywordName",
userVmSearchBuilder.entity().getHostName(), Op.LIKE);
- userVmSearchBuilder.or("keywordState",
userVmSearchBuilder.entity().getState(), Op.EQ);
+ SearchBuilder<UserVmJoinVO> userVmJoinSearchBuilder =
_userVmJoinDao.createSearchBuilder();
Review Comment:
It would be better to make a join with NIC table instead of UserVMJoin from
performance point of view.
--
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]