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

Announcements

No record found.

News and Announcements icon
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,466 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,656 Super User 2026 Season 1 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,466 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
    511 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
Henrik Nordlöf Profile Picture

Henrik Nordlöf 2 User Group Leader

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans