Breaking news from around the world
Get the Bing + MSN extension
Now Available in Community - MBAS 2019 Presentation Videos
Catch the most popular sessions on demand and learn how Dynamics 365, Power BI, PowerApps, Microsoft Flow, and Excel are powering major transformations around the globe. | View Gallery
2019 release wave 2 Discover the latest updates to Dynamics 365Release overview guides and videos Release Plan | Early Access Availability
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Talent TechTalks | Upcoming TechTalks
This post is part of a multi-part blog series regarding RetrieveMultiple performance. To see a list of the other parts of this series, click here.
If you are a System Administrator, or have global access to the entity you are trying to query, the RetrieveMultiple statement does not need to take security into consideration. In this scenario, the query is very straight forward. Below is an example of this type of query for Activity records:
select top 51 "activitypointer0".Subject as "subject"
, "activitypointer0".PriorityCode as "prioritycode"
, "activitypointer0".RegardingObjectId as "regardingobjectid"
, "activitypointer0".ActivityTypeCode as "activitytypecode"
, "activitypointer0".StateCode as "statecode"
, "activitypointer0".ScheduledStart as "scheduledstart"
, "activitypointer0".ScheduledEnd as "scheduledend"
, "activitypointer0".InstanceTypeCode as "instancetypecode"
, "activitypointer0".ActivityId as "activityid"
, "activitypointer0".RegardingObjectIdYomiName as "regardingobjectidyominame"
, "activitypointer0".RegardingObjectTypeCode as "regardingobjecttypecode"
, "activitypointer0".RegardingObjectIdName as "regardingobjectidname"
, "activitypointerowningusersystemusersystemuserid".InternalEMailAddress as "activitypointerowningusersystemusersystemuserid.internalemailaddress"
ActivityPointer as "activitypointer0" WITH (NOLOCK) left outer join SystemUser as "activitypointerowningusersystemusersystemuserid" WITH (NOLOCK) on ("activitypointer0".OwningUser = "activitypointerowningusersystemusersystemuserid".SystemUserId)
(("activitypointer0".IsRegularActivity = 1)) order by
, "activitypointer0".ActivityId asc
create nonclustered index [activityperftest] on ActivityPointerBase
Business Applications communities