Skip to content

[Query engine] Cache intermediate routing calculations #458

@levkk

Description

@levkk

Description

Currently, we cache the AST of the query only and repeat the same calculations for each incoming query. They are generally very quick, but unnecessary - if the AST is the same, so will be the intermediate objects we construct to parse it.

We should cache most of these and apply only the last parameter sharding step on the cached intermediaries. This will reduce the number of memory allocations and will give us a few nanoseconds of latency back.

Examples

pub fn parse(stmt: &SelectStmt) -> Result<Self, Error> {

let where_clause = WhereClause::new(table.map(|t| t.name), &stmt.where_clause);

Metadata

Metadata

Assignees

No one assigned

    Labels

    bleeding edgeExciting new frontier stuff.

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions