locked
Do I need to page Fetch Queries if I am only aggregating? RRS feed

  • Question

  • I was reading on MSDN Docs about FetchXML and paging. I'm unclear about a certain thing. Understanding the limitations of 50,000 - if I wanted to aggregate, do I need paging for large recordsets?

    Assuming I have the query below:

    <fetch distinct='false' mapping='logical' aggregate='true'> <entity name='opportunity'> <attribute name='opportunityid' alias='opportunity_count' aggregate='count'/> <attribute name='estimatedvalue' alias='estimatedvalue_sum' aggregate='sum'/> <attribute name='estimatedvalue' alias='estimatedvalue_avg' aggregate='avg'/> <attribute name='actualclosedate' groupby='true' dategrouping='month' alias='month' /> <filter type='and'> <condition attribute='statecode' operator='eq' value='Won' /> </filter> </entity> </fetch>";

    Also, for aggregates I have noticed that I am not allowed to specify what columns are retrieved; will there be a performance hit?

    Wednesday, January 22, 2014 5:08 PM

All replies

  • There is no limitation when you aggregate the data.

    What do you mean by "not allowed to specify column retrieved"?

    Thursday, January 23, 2014 4:39 AM