cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CLOUDSTACK-10065) Optimize SQL queries in listTemplate API to improve performance.
Date Tue, 31 Oct 2017 13:58:00 GMT

    [ https://issues.apache.org/jira/browse/CLOUDSTACK-10065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16226824#comment-16226824
] 

ASF GitHub Bot commented on CLOUDSTACK-10065:
---------------------------------------------

PranaliM 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_r148003170
 
 

 ##########
 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:
   Replaced as suggested.

----------------------------------------------------------------
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


> Optimize SQL queries in listTemplate API to improve performance. 
> -----------------------------------------------------------------
>
>                 Key: CLOUDSTACK-10065
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10065
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>            Reporter: Pranali Mande
>
> *Description*:
> The db queries could be optimized to get unique results from the database which could
help in reducing the listTemplate API response time.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message