Skip to content

Conversation

@vietj
Copy link
Member

@vietj vietj commented Apr 27, 2025

Motivation:

The implementation of prepared statement tries to accomodate both a lazy mode and a non lazy one, leading to the utilization of a future to unify the obtention of the prepared statement.

This is clearly suboptimal for the common case, since lazy prepared statement is only necessary when meeting indeterminate prepared statement (ambiguous) that requires a tuple for an actual preparation.

In addition the execution is done using a context comparison which fails when on a duplicated context.

Changes:

Use the context in thread comparison instead of context equality.

Make a prepared statement base which has two implementations lazy/direct which are both optimized for their specific cases.

@vietj vietj added this to the 5.0.0 milestone Apr 27, 2025
@vietj vietj force-pushed the improve-prepared-statement-impl branch from 3adede0 to bb78664 Compare April 28, 2025 06:53
Motivation:

The implementation of prepared statement tries to accomodate both a lazy mode and a non lazy one, leading to the utilization of a future to unify the obtention of the prepared statement.

This is clearly suboptimal for the common case, since lazy prepared statement is only necessary when meeting indeterminate prepared statement (ambiguous) that requires a tuple for an actual preparation.

In addition the execution is done using a context comparison which fails when on a duplicated context.

Changes:

Use the context in thread comparison instead of context equality.

Make a prepared statement base which has two implementations lazy/direct which are both optimized for their specific cases.
@vietj vietj force-pushed the improve-prepared-statement-impl branch from bb78664 to d728441 Compare April 28, 2025 07:00
@vietj vietj self-assigned this Apr 28, 2025
@vietj vietj closed this Apr 28, 2025
@vietj vietj deleted the improve-prepared-statement-impl branch April 28, 2025 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants