3

プラットフォームの速度と、Dynamics CRM 4 のデータ (読み取り専用) にアクセスするための保守性の観点から、どの方法が最適ですか? 私は 3 つすべてを行いましたが、群​​衆の意見に興味があります。

  • API経由
  • Web サービス経由で直接
  • ビューへの DB 呼び出しを介して

...なぜ?

私の考えは通常、ビューへの DB 呼び出しに集中していますが、純粋主義者がいることは知っています。

4

3 に答える 3

2

両方の要件を考えると、ビューを呼び出したいと思います。適切に作成された SQL クエリは飛んでいきます。

データを変更する予定がある場合は API を使用する必要がありますが、エンティティの深い読み込みができないため、最速の方法ではありません。たとえば、顧客とその注文を確認したい場合は、両方を個別にロードしてから手動で結合する必要があります。SQLクエリにはすでにデータが結合されています。

TDS ストリームは、API および Web サービスで使用される SOAP メッセージよりもはるかに効率的であることに注意してください。

アップデート

一般に、ビューと CRM データベースに関して指摘しておく必要があります。CRM は、カスタム エンティティのテーブルまたはビューのインデックスを最適化しません (どうすればよいでしょうか?)。そのため、目的地で常に検索するトラック積載エンティティがある場合は、そのプロパティのインデックスを追加する必要があります。アプリケーションによっては、パフォーマンスに大きな違いが生じる可能性があります。

于 2010-03-29T14:29:38.467 に答える
1

ビュー(*baseと*extensionbase)の代わりにテーブルに対して直接クエリを実行すると、さらに高速になるということで、jakeのコメントに追加します。

速度の順に次のようになります。

  1. 直接テーブルクエリ
  2. クエリを表示
  3. フィルタされたビュークエリ
  4. API呼び出し
于 2010-03-29T15:58:48.507 に答える
0

Direct table updates:

I disagree with Jake that all updates must go through the API. The correct statement is that going through the API is the only supported way to do updates. There are in fact several instances where directly modifying the tables is the most reasonable option:

  • One time imports of large volumes of data while the system is not in operation.

  • Modification of specific fields across large volumes of data.

I agree that this sort of direct modification should only be a last resort when the performance of the API is unacceptable. However, if you want to modify a boolean field on thousands of records, doing a direct SQL update to the table is a great option.

Relative Speed

I agree with XVargas as far as relative speed.

Unfiltered Views vs Tables: I have not found the performance advantage to be worth the hassle of manually joining the base and extension tables.

Unfiltered views vs Filtered views: I recently was working with a complicated query which took about 15 minutes to run using the filtered views. After switching to the unfiltered views this query ran in about 10 seconds. Looking at the respective query plans, the raw query had 8 operations while the query against the filtered views had over 80 operations.

Unfiltered Views vs API: I have never compared querying through the API against querying views, but I have compared the cost of writing data through the API vs inserting directly through SQL. Importing millions of records through the API can take several days, while the same operation using insert statements might take several minutes. I assume the difference isn't as great during reads but it is probably still large.

于 2014-03-21T22:32:26.857 に答える