Skip to content

Commit 3e6e21d

Browse files
authored
Merge branch 'live' into patch-1
2 parents 90043a5 + 3c19413 commit 3e6e21d

File tree

107 files changed

+1432
-344
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+1432
-344
lines changed

powerapps-docs/developer/common-data-service/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
href: column-comparison.md
3434
- name: FetchXML search item limit
3535
href: quick-find-limit.md
36+
- name: Improve FetchXML request performance
37+
href: fetchxml-performance.md
3638
- name: "Use SQL to query data (Preview)"
3739
href: cds-sql-query.md
3840
- name: Saved Queries

powerapps-docs/developer/common-data-service/cds-sql-query.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Use SQL to query data (Common Data Service) | Microsoft Docs" # Intent and product brand in a unique string of 43-59 chars including spaces
33
description: "Learn how to query Common Data Service entity data using SQL." # 115-145 characters including spaces. This abstract displays in the search result.
44
ms.custom: ""
5-
ms.date: 05/26/2020
5+
ms.date: 09/25/2020
66
ms.reviewer: "pehecke"
77
ms.service: powerapps
88
ms.topic: "article"
@@ -20,8 +20,13 @@ search.app:
2020

2121
[!INCLUDE[cc-beta-prerelease-disclaimer](../../includes/cc-beta-prerelease-disclaimer.md)]
2222

23+
> [!WARNING]
24+
> A problem has been identified with the Tabular Data Stream (TDS) endpoint. This feature is globally disabled, and we are working urgently to address the issue. This topic will be updated when the issue is resolved or when we have more information to share.
25+
2326
A SQL data connection is available on the Common Data Service endpoint. The SQL connection provides read-only access to the entity data of the target Common Data Service environment. This allows you to write and execute SQL queries against the entity data table. Table columns provide the attribute data of the entity. No custom views of the data have been provided.
2427

28+
29+
2530
> [!IMPORTANT]
2631
> - This is a preview feature, and isn't available in all regions.
2732
> - [!INCLUDE[cc_preview_features_definition](../../includes/cc-preview-features-definition.md)]
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
---
2+
title: Improve FetchXML request performance | Microsoft Docs
3+
description: Learn how developers can improve FetchXML request performance when using Common Data Service.
4+
author: NHelgren
5+
manager: annbe
6+
ms.service: powerapps
7+
ms.topic: article
8+
ms.date: 09/28/2020
9+
ms.author: nhelgren
10+
ms.reviewer: "pehecke"
11+
search.audienceType:
12+
- developer
13+
search.app:
14+
- PowerApps
15+
- D365CE
16+
---
17+
18+
# Improve FetchXML request performance
19+
20+
An option available in FetchXML requests called *LateMaterialize* allows you to break up such
21+
requests into smaller more usable segments which can improve the performance of long running FetchXML requests.
22+
23+
> [!NOTE]
24+
> Performance improvements depend on the data distribution for each
25+
> participating entity and linked entity. Late materialization may not always
26+
> provide a performance benefit. It is best used if you are experiencing
27+
> performance issues with your existing fetch request.
28+
29+
Executing a traditional fetch for a given number of the top entity records will pull all
30+
the columns in the select list that meet the filter criteria. Let’s say you are
31+
pulling the top 500 records on an entity that has 100 columns and 100K rows
32+
that meet the filter criteria, this request can cause issues in two ways:
33+
34+
- The 99.5K rows will pull all columns, even though you only need to populate
35+
the select list for 500 rows when returning to the client.
36+
37+
- Query Optimizer can generate an arbitrary order when retrieving the child
38+
columns, resulting in an undesired data order.
39+
40+
Using `LateMaterialize` allows you to create a fetch that will:
41+
42+
- First pull only the primary ID of the top number of records specified.
43+
44+
- Select only the columns of data needed based on the primary IDs that were
45+
retrieved. For example, where only 5 columns are needed for display in the form.
46+
47+
By pulling only the needed data after the primary IDs are collected, the
48+
retrieval is much faster as data that is not needed for the current operation is
49+
excluded.
50+
51+
This is most beneficial when:
52+
53+
- The entity you are querying has one or more links to other entities for column data.
54+
55+
- There are many columns in the entity.
56+
57+
- The entity contains logical attributes.
58+
59+
## Syntax
60+
61+
```xml
62+
<fetch version="1.0" output-format="xml-platform" latematerialize="true"
63+
 mapping="logical" distinct="true">
64+
65+
<entity name="[entity]">​
66+
<attribute name="[attribute]" />
67+
68+
<link-entity name="[entity]" from="[linked entity]" to="[linked entityid]"
69+
link-type="outer" alias="[alias]">​
70+
<attribute name="[name of linked entity column]" />​
71+
</link-entity>
72+
73+
<filter type=[filter type]>​
74+
<condition attribute="[column]" operator="[operator]" value="[value]"/> ​
75+
</filter>​
76+
</entity>
77+
78+
</fetch>
79+
```
80+
81+
## Sample
82+
83+
```XML
84+
<fetch version="1.0" output-format="xml-platform" latematerialize="true"
85+
  mapping="logical" distinct="true">
86+
87+
<entity name="account">​
88+
<attribute name="accountnumber" />​
89+
<attribute name="createdby" />​
90+
<attribute name="ownerid" />​
91+
92+
<link-entity name="account" from="accountid" to="parentaccountid"
93+
link-type="outer" alias="oaccount">​
94+
<attribute name="createdby" />
95+
96+
<link-entity name="account" from="accountid" to="accountid" link-type="outer"
97+
alias="oaccount1">​
98+
<attribute name="createdby" />​
99+
<attribute name="accountid" />​
100+
<attribute name="name" />​
101+
</link-entity>​
102+
</link-entity>​
103+
104+
<link-entity name="account" from="accountid" to="accountid" link-type="outer"
105+
alias="oaccount2"/>
106+
107+
<filter type='and'>​
108+
<condition attribute="statecode" operator="eq" value="2"/> ​
109+
</filter>​
110+
</entity>​
111+
112+
</fetch>
113+
```
114+
115+
### See Also
116+
117+
[Use FetchXML to construct a query](use-fetchxml-construct-query.md)

powerapps-docs/developer/common-data-service/virtual-entities/sample-generic-ve-plugin.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ search.app:
2727

2828
This sample shows a minimal implementation for a generic Common Data Service virtual entity data provider plug-in, **DropboxRetrieveMultiplePlugin**, for the [Dropbox](https://www.dropbox.com/) file-sharing service. It uses the "bare metal" approach, translating the <xref:Microsoft.Xrm.Sdk.Query.QueryExpression> through the creation of the custom visitor class, **DropBoxExpressionVisitor**. It returns a collection of the files that satisfy the search criteria as an <xref:Microsoft.Xrm.Sdk.EntityCollection>.
2929

30+
> [!NOTE]
31+
> This sample requires the use of ILMERGE to combine the plug-in and Dropbox assemblies prior to registering the assembly with Common Data Service. Use of ILMERGE is not officially supported. A future update to this sample will remove the need to use ILMERGE.
32+
3033
## Getting started
3134

3235
In order to build this sample, you must first install the [Dropbox.Api](https://www.nuget.org/packages/Dropbox.Api/) and [Microsoft.CrmSdk.Data](https://www.nuget.org/packages/Microsoft.CrmSdk.Data/) NuGet packages in your solution. You'll also need a DropBox account and pass a real access token when creating an instance of the **DropboxClient**.
@@ -119,4 +122,4 @@ public class DropboxRetrieveMultiplePlugin : IPlugin
119122

120123
[Get started with virtual entities](get-started-ve.md)<br />
121124
[API considerations of virtual entities](api-considerations-ve.md)<br />
122-
[Custom virtual entity data providers](custom-ve-data-providers.md)
125+
[Custom virtual entity data providers](custom-ve-data-providers.md)

powerapps-docs/developer/common-data-service/walkthrough-register-app-azure-active-directory.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,10 @@ App registration can also be done by an application developer or individual user
6666
7. Search for and choose **Common Data Service** under the **APIs my organization uses** tab.
6767

6868
![Select API](media/app-registration-select-api-page.png "Select API")
69-
70-
8. Click on **Delegated permissions** and check the options and click on **Add permissions**.
69+
> [!TIP]
70+
> If you are presented with more than one **Common Data Service** item in the search list, choose any one of them. In the next step the service name and URL will be shown. At that point you can go back to the API search and choose a different Common Data Service list item if needed.
71+
72+
8. Click on **Delegated permissions** and check the options and click on **Add permissions**.
7173

7274
![Delegate Permissions](media/app-registration-delegate-permissions-page.png "Delegate Permission")
7375
> [!NOTE]

powerapps-docs/developer/common-data-service/webapi/enhanced-quick-start.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Edit the `<configuration>` element to add a the `connectionStrings` node as show
6868
<connectionStrings>
6969
<!--Online using Office 365-->
7070
<add name="Connect"
71-
connectionString="Url=https://yourorg.api.crm.dynamics.com;[email protected];Password=y0urp455w0rd; />
71+
connectionString="Url=https://yourorg.api.crm.dynamics.com;[email protected];Password=mypassword;" />
7272
</connectionStrings>
7373
</configuration>
7474
```

0 commit comments

Comments
 (0)