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.
Here's the main entrypoint to running an OxQL query:
omicron/oximeter/db/src/client/oxql.rs
Lines 334 to 343 in df990b0
That takes a
Handle, a database connection claimed from theqorbconnection 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.