Data Grid / Data View page loading extremely slow (~1 min) for specific user role after upgrading Studio Pro 8 → 9.24

0
After upgrading an app from Studio Pro 8.18 to Studio Pro 9.24, pages using Data View and Data Grid widgets have become very slow (~1 minute to load) for one specific user role — but only for that role. Other roles load the same pages instantly.This slowdown is new behavior since the 8 → 9.24 upgrade. The same role/pages performed acceptably on Studio Pro 8.EnvironmentPrevious version: Studio Pro 8.18 LTS Current version: Studio Pro 9.24.42 LTS Widgets affected: List view , Data Grid Total Objects count : Around 3000 objects Data source: Database (no microflow/nanoflow)Database index has already been added on the relevant entity attribute(s) used for sorting, Pagination added in data grid , Number of rows set to :20Much appreciate any suggestions/ best practices to address this issue.Thansk
asked
2 answers
0

Since the issue occurs only for one user role, while other roles load the same page immediately, I would investigate entity access/XPath constraints for that role first, rather than the Data Grid itself.

After the Mendix 8 → 9 upgrade, the generated database queries may differ, and a complex access rule can become much more expensive when retrieving ~3,000 objects.

I would check:

  1. Compare the affected role's entity access rules/XPath constraints with a role that loads the page quickly.
  2. Temporarily test the affected role with the same entity access as a working role. If the page becomes fast, you've isolated the problem.
  3. Look especially for XPath constraints that traverse multiple associations, use [%currentUser%], or contain several conditions.
  4. Check whether the indexes support not only the sorting attribute, but also attributes/associations involved in the filtering/access constraint.

The strongest clue here is:

Same entity + same page + same database + different role = very different performance.

That makes role-specific entity access/security constraints a strong candidate.

Please accept this solution if it helps

answered
0

Likely cause: Entity access (XPath) constraints, not the widgets themselves.

Studio Pro 9 enforces module role XPath constraints on entity access more strictly than 8.x — especially constraints that reference associated entities. Since the slowdown is role-specific, check whether that one role has an XPath constraint on the entity (or its associations) that other roles don't have (admin often bypasses it).

To confirm & fix:

  1. Go to entity Access rules → find the constraint applied to that specific role's module role.
  2. If the constraint traverses an association (e.g. [Association/Entity/Attribute = ...]), that's your culprit — Mendix 9 wraps this in a subquery that often can't use your existing index.
    • Fix options:Add a database index on the foreign key / association column used in the constraint (not just the sort attribute).
    • Simplify the constraint — avoid multi-hop associations in XPath where possible; denormalize a flag/attribute onto the entity itself if feasible.
    • If constraint logic is complex, replace the DB data source with a microflow data source using a proper OQL/Retrieve with explicit range + sort — gives you full control over the query plan.
  3. Enable query logging temporarily (com.mendix.core → Trace/Debug or use the Performance tab in Studio Pro / runtime logs) to capture the actual generated SQL for that role and compare it against another role — this will show exactly where the extra JOIN/subquery is coming from.

This pattern (role-specific slowness after 8→9 upgrade with Data Grid/List View) is a commonly reported regression tied to XPath-based entity access, not a widget/pagination issue — your indexing and pagination setup is already correct.


answered