You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by gi...@git.apache.org on 2017/09/28 05:22:53 UTC

[GitHub] rhtyd commented on a change in pull request #2260: CLOUDSTACK-10065: Optimize SQL queries in listTemplate API to improve performance

rhtyd commented on a change in pull request #2260: CLOUDSTACK-10065: Optimize SQL queries in listTemplate API to improve performance
URL: https://github.com/apache/cloudstack/pull/2260#discussion_r141528300
 
 

 ##########
 File path: framework/db/src/com/cloud/utils/db/GenericDaoBase.java
 ##########
 @@ -1927,6 +1935,54 @@ public Integer getDistinctCount(SearchCriteria<T> sc) {
         }
     }
 
+    public Integer getDistinctCount(SearchCriteria<T> sc, String[] distinctColumns) {
+        String clause = sc != null ? sc.getWhereClause() : null;
+        if (clause != null && clause.length() == 0) {
 
 Review comment:
   This can be replaced with `Strings.isNullOrEmpty()`
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services