Skip to main content

Notifications

Dynamics 365 Community / Forums / Finance forum / Improve performance of...
Finance forum
Suggested answer

Improve performance of Dynamics 365 OData query

Posted on by 2,890

Hello everyone,

I am creating a VS solution to extract data out of the General Journal Account entries entity in Dynamics 365, the entity contains several records and it takes too many hours to get all the information completed, besides I need to re-run the query each time since OData only retrieves 10,000 records, so I'm doing something like this:

var records = context.SclGeneralJournalAccountEntries.Where(h => h.CreationDateTime >= dateFilter).AsQueryAble().Take(10000).Skip(20000);

foreach (var entry in records)
{
   Console.WriteLine("{0} - {1}", entry.SubLedgerVoucher, counter);
}

Is there a way to make this process faster? I'm just starting to work with OData, but again, this takes too much time to get them all; if there's a way to improve performance, I would appreciate the help, regards!

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,148 on at
    RE: Improve performance of Dynamics 365 OData query

    You should consider using something else than OData if you are handling large data volumes. BYODB is one option: docs.microsoft.com/.../export-entities-to-your-own-database

    If you use OData, it's faster to fetch 10 x 1000 records in parallel than 1 x 10 000.

  • Abhimanyu Naruka Profile Picture
    Abhimanyu Naruka 160 on at
    RE: Improve performance of Dynamics 365 OData query

    Hi Saman

    Did you found any good numbers on performance?

    Thanking you

    Abhimanyu

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,522 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,441 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans