locked
waht is the lmit for ther ecords count to put inside not in condition for fetch xml query in mscrm 2011 RRS feed

  • Question

  • Hi,

    In the below fetch xml, how many records i can add in not in condition. how many records can i add under not in condition, maximum limit any hit on performance and any other best alternative.

     

    <fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>
                                                                          <entity name='aon_country'>
                                                                            <attribute name='aon_country' />
                                                                            <attribute name='ownerid' />
                                                                            <attribute name='aon_countrycode' />
                                                                            <attribute name='aon_countryid' />
                                                                            <order attribute='aon_country' descending='false' />
                                                                            <filter type='and'>
                                                                              <condition attribute='aon_countryid' operator='not-in'>
                                                                                     <value>{0}</value>

                                                                                  <value>{1}</value>   

                                                                               </condition>
                                                                                </filter>
                                                                              <link-entity name='team' from='teamid' to='owningteam' alias='aa'>
                                                                              <filter type='and'>
                                                                                <condition attribute='businessunitid' operator='in'>
                                                                                  <value uitype='businessunit'>{1}</value>
                                                                                </condition>
                                                                              </filter>
                                                                            </link-entity>
                                                                          </entity>
                                                                        </fetch>

     

     


    hari
    Thursday, December 15, 2011 1:34 PM

All replies

  • One limit is the number of parameters SQL will accept on the sp_executesql stored procedure. This limit is ~2150, all values in the fetchXml will count to this limit, and CRM may add some more.

    Re performance; so many factors are involved that it is difficult to make a judgement on this


    Microsoft CRM MVP - http://mscrmuk.blogspot.com  http://www.excitation.co.uk
    Thursday, December 15, 2011 4:31 PM
    Moderator