Skip to content

Suspect suboptimal query logic when combining primary filter, paging and included resource #1739

Open
@bjornharrtell

Description

@bjornharrtell

SUMMARY

I've been looking into performance issues when making a filtered request that also includes some related resource collection and pagination is enabled and I suspect the query strategy is suboptimal.

DETAILS

It seems the query that is being built will use row_number window function on the full set of related resources, filtering applied afterwards.

STEPS TO REPRODUCE

Not available yet. Working on a full reproduction as standalone repo, or possibly as fork of JsonApiDotNetCore.

VERSIONS USED

  • JsonApiDotNetCore version: 5.7.1
  • ASP.NET Core version: Latest on .NET 9.0
  • Entity Framework Core version: 9.0.5
  • Database provider: Npgsql.EntityFrameworkCore.PostgreSQL 9.0.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions