Git Product home page Git Product logo

executemultiplevstransaction's Introduction

Overview

The purpose of this example, is to demonstrate a potential difference in Dynamics 365 for Customer Engagement platform performance when performing operations in batches.

The program will create Account records by utilizing ExecuteMultiple & ExecuteTransaction batching.

It will create a configurable number of records in a configurable number of batches - both for ExecuteMultiple & ExecuteTransaction.

Getting started

A connection string to your Dynamics 365 organization must be provided in the App.config file.

Additional configuration

Both settings are per ExecuteMultiple & ExecuteTransaction run.

NumberOfBatches - number of batches to run

RecordsPerBatch - number of records to create per batch

Sample output

Connected to <ORG>, Version 9.0.0.3172
Testing ExecuteMultiple & ExecuteTransaction for 5 cycles with 10 records per cycle.

Running ExecuteMultiple
Creating 10 Accounts took 1387ms
Creating 10 Accounts took 1206ms
Creating 10 Accounts took 1432ms
Creating 10 Accounts took 1228ms
Creating 10 Accounts took 1129ms
ExecuteMultiple took 1281ms per batch (avg)

Running ExecuteTransaction
Creating 10 Accounts took 1022ms
Creating 10 Accounts took 1116ms
Creating 10 Accounts took 1125ms
Creating 10 Accounts took 1126ms
Creating 10 Accounts took 1126ms
ExecuteTransaction took 1105ms per batch (avg)

ExecuteMultiple:     1281,2ms per batch (avg)
                     7,81 records per second
ExecuteTransaction:  1105ms per batch (avg)
                     9,05 records per second

ExecuteTransaction vs. ExecuteMultiple: 13,75%

Done.

Notes

Do not run this script on any production environment.

This example is not trying to demonstrate any other preferred practices or optimizations.

executemultiplevstransaction's People

Contributors

sanjint avatar

Forkers

compashi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.