• ashok chandra
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies

I have 45,000 Records in Transaction Object.

I am running two 'group by' queries on Transaction Object.
Follwing are the queries.

Aggregations:0|select max(id) id1, Max(CnP_PaaS__CnP_Account_ID__c) ClickAndPledgeAccountName,Max(CnP_PaaS__CnPAccountID__c) ClickAndPledgeAccountId,Max(CnP_PaaS__Contact__r.Email) ContactEmail,CnP_PaaS__Contact__r.Name ContactName from CnP_PaaS__CnP_Transaction__c where id!=null and (CnP_PaaS__Application_Name__c=:appname or CnP_PaaS__Application_Name__c=null) and CnP_PaaS__TransactionTimeZone__c != Null Group by CnP_PaaS__Contact__r.Name


Rows:1256


Aggregations:0|select max(id) id1, Max(CnP_PaaS__CnP_Account_ID__c) ClickAndPledgeAccountName,Max(CnP_PaaS__CnPAccountID__c) ClickAndPledgeAccountId,Max(CnP_PaaS__Contact__r.Email) ContactEmail,CnP_PaaS__Contact__r.Name ContactName from CnP_PaaS__CnP_Transaction__c where id!=null and (CnP_PaaS__Application_Name__c=:appname or CnP_PaaS__Application_Name__c=null) and CnP_PaaS__TransactionTimeZone__c != Null Group by CnP_PaaS__Contact__r.Name limit 400


Rows:400

when i am running these queries i am getting an exception.

"Too many query rows: 50001"

So, What is the solution for this.

I have 45,000 Records in Transaction Object.

I am running two 'group by' queries on Transaction Object.
Follwing are the queries.

Aggregations:0|select max(id) id1, Max(CnP_PaaS__CnP_Account_ID__c) ClickAndPledgeAccountName,Max(CnP_PaaS__CnPAccountID__c) ClickAndPledgeAccountId,Max(CnP_PaaS__Contact__r.Email) ContactEmail,CnP_PaaS__Contact__r.Name ContactName from CnP_PaaS__CnP_Transaction__c where id!=null and (CnP_PaaS__Application_Name__c=:appname or CnP_PaaS__Application_Name__c=null) and CnP_PaaS__TransactionTimeZone__c != Null Group by CnP_PaaS__Contact__r.Name


Rows:1256


Aggregations:0|select max(id) id1, Max(CnP_PaaS__CnP_Account_ID__c) ClickAndPledgeAccountName,Max(CnP_PaaS__CnPAccountID__c) ClickAndPledgeAccountId,Max(CnP_PaaS__Contact__r.Email) ContactEmail,CnP_PaaS__Contact__r.Name ContactName from CnP_PaaS__CnP_Transaction__c where id!=null and (CnP_PaaS__Application_Name__c=:appname or CnP_PaaS__Application_Name__c=null) and CnP_PaaS__TransactionTimeZone__c != Null Group by CnP_PaaS__Contact__r.Name limit 400


Rows:400

when i am running these queries i am getting an exception.

"Too many query rows: 50001"

So, What is the solution for this.