web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Difference between firstOnly and firstFast

(0) ShareShare
ReportReport
Posted on by

What is the difference between firstOnly and firstFast keyword in a select statement and when should we use them?

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Florian Hopfner Profile Picture
    2,461 on at

    firstFast

    A priority hint. The first row appears more quickly but the total return time for this option might be slower. The firstFast hint is automatically issued from all forms, but is rarely used directly from X++.

    firstOnly

    Speeds up the fetch. Instructs MorphX to fetch only the first record

    From Select Statement Syntax [AX 2012]

  • Verified answer
    Anton Venter Profile Picture
    20,345 Super User 2025 Season 2 on at

    Hi Rohan, firstOnly will select only the first record in the query so should be used when you need a single record only e.g. in the find method of your table. FirstFast will return the first records in the query faster than the following records, this makes sense when you are viewing data in a form but total time it takes might be more. Have a look at this article on MSDN.

  • Verified answer
    Community Member Profile Picture
    on at

    firstOnly returns (maximum) one record, it is used if you know in advance there will be only one record in the result set (when selecting on recId for example)

    with firstFast your resultset can have multiple records, but it makes sure the first one is fetched faster than the remaining ones.

    It is used for performance optimization (on forms and list pages for example, check blogs.msdn.com/.../ax2012-list-pages-performance-improvement.aspx)

  • Community Member Profile Picture
    on at

    Thanks Anton and FH-Inway.

  • Community Member Profile Picture
    on at

    Thanks Tom.

  • Florian Hopfner Profile Picture
    2,461 on at

    If our answers answered your question, you can mark them as accepted, this way other users will know quickly if this question has an answer or not.

  • Huggins Mafigu Profile Picture
    507 on at

    Clear and precise. Wonderful

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans