Skip to content

Unwanted 'ORDER BY' Clauses in Cube.js-Trino Queries #7813

Open
@ka-weihe

Description

@ka-weihe

I'm integrating Cube.js with Trino and encountering performance issues due to the way Cube.js handles queries. Specifically, Cube.js appends an "ORDER BY" clause to all queries directed to Trino. This becomes a bottleneck because, even with a LIMIT clause (e.g., LIMIT 10), Trino performs a full dataset scan when an "ORDER BY" is present, leading to significant slowdowns when dealing with large tables. I connect to Cube.js using psql. Is there an approach to either disable the automatic "ORDER BY" addition or to optimize query performance under these conditions?"

Metadata

Metadata

Assignees

No one assigned

    Labels

    driver:trinoIssues relating to the Trino driverquestionThe issue is a question. Please use Stack Overflow for questions.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions