Skip to content

Performance Issue: N+1 Queries When Loading Tables with Many Columns #1896

@LLY0203

Description

@LLY0203

Is your idea related to a problem? Please describe.
When loading pages that display tables with many columns, a separate query is executed per column to fetch associated terms. However, column-level terms are not currently supported or used, so these queries consistently return empty results.

For wide tables (50+ columns or more), this results in an N+1 query pattern that significantly impacts performance, even though the fetched data is never used, and can ultimately cause GraphQL Lambda timeouts.

Describe the solution you'd like
Since column-level terms are not implemented or used, they could be excluded from column-level queries (e.g. ListDatasetTableColumns). This would eliminate the N+1 query pattern and significantly improve performance for wide tables.

P.S. Don't attach files. Please, prefer add code snippets directly in the message body.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions