Skip to content

How to reduce the gap between Diesel's sql_query (RAW) and the ORM mode ? #4049

Answered by weiznich
rxdiscovery asked this question in Q&A
Discussion options

You must be logged in to vote

I fear it's hard to answer this specific question without knowing your exact benchmark code and setup. That said it is currently expected that sql_query is somewhat slower than using the dsl (as shown by our own benchmarks). That's because the DSL is able to utilise compile time type information about your query that are not available for sql_query. There these information need to be computed at runtime which requires additional time.

That all written: We are always open to accept contributions that improve performance as long as they do not break existing code.

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by rxdiscovery
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@rxdiscovery
Comment options

@belovaf
Comment options

@belovaf
Comment options

@rxdiscovery
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants