Skip to content

Running an OxQL query holds database connections too long #11251

Description

@bnaecker

Here's the main entrypoint to running an OxQL query:

async fn run_oxql_query(
&self,
query_log: &Logger,
handle: &mut Handle,
query_id: Uuid,
query: oxql::Query,
total_rows_fetched: &mut u64,
outer_predicates: Option<Filter>,
outer_limit: Option<Limit>,
) -> Result<OxqlResult, Error> {

That takes a Handle, a database connection claimed from the qorb connection pool in the client. We're holding that too long, most notably while running any in-memory table operations on the data. That's really not needed, and probably reduces overall throughput quite a bit. We should acquire new connections only as needed, when making a query against the database, and then drop them right after.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    clickhouseRelated to the ClickHouse metrics DBMSoximeteroxqlOximeter Query Langauge

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions