Skip to main content

Notifications

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

Improve performance of Dynamics 365 OData query

(0) ShareShare
ReportReport
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,156 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

News and Announcements

Announcing Category Subscriptions!

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

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

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,359 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans