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)

Why AX kernel Creates Cross Joins wherever Inner Join is required / expected ??

(0) ShareShare
ReportReport
Posted on by 1,185

Hi i am using ax 2012 R3 cu10 version. I have seen that for certain system or custom views, kernel is using cross join even if i have used 1:1 inner join and table relations. I have seen one such discussion on the blog

(https://community.dynamics.com/ax/f/33/t/180942) but didn't find any solution.

In my case system is using DimensionAttributelevelValueView in Financial Statement(traditional) report and is taking too much time ( hours). But when i alter this view on sql then system loads the data in few minutes.

Is there any way we can fix this from AX itself, as we are facing performance issues on many views ?

View in AX 2012 :

AXview.jpg

SQL View:

SQLView.jpg

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    Your images haven't been attached (the post contains empty img tags).

  • Manmohan Mehta Profile Picture
    1,185 on at

    Thanks Martin, You can see them now :)

  • Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    What performance problem you have with this query? (The execution plan will tell you which part takes most time.)

    What alteration did you make?

    In general, it shouldn't matter that there is CROSS JOIN, as long as there are right conditions in WHERE.

  • Manmohan Mehta Profile Picture
    1,185 on at

    Hi Martin,

    Thanks for reply.

    I alter query of this view in sql by using inner joins wherever there is cross join , the same query with same set of data gives result for 1000 records in 3 sec otherwise system query took 2 minutes to give that output.

    I checked the index on tables used in query and rebuild them for performance gain but found no change.

    I cannot find the reason from execution plan otherwise i would have done that.

  • Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    Execution plans are the best place where you can find the answer. I can say how your execution plan differs, so there is nothing I can tell you. Consider share sharing both queries as text (so others can copy and run them) and execution plans from your environment.

  • Vilmos Kintera Profile Picture
    46,149 on at

    We do not think that having a cross join is the root cause of the performance issue.

    Please note that changing metadata, like what the views look like in SQL Server database is bad practice, since metadata must be maintained within the AX Application Object Tree. If your views would be recreated with a Data Dictionary synchronization, it would go back to what they were before.

  • Manmohan Mehta Profile Picture
    1,185 on at

    @Vilmos That is what i was trying to figureout and yes i knew that synchronization will revert the view from ax. I am trying to understand why kernel is creating such unoptimized query...

    @Martin Sure i will revert and share my both queries as text and try my best to figureout the cause from execution plan

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