question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for precompiled statements

See original GitHub issue
  1. I think it will be helpful to have in LowLevel getter for underlying sqLiteOpenHelper. The same thing has been already implemented in StorIOContentResolver.LowLevel and it can solve problems with such particular thinks like precompiled statements if user will need it.
  2. To complete support for prepared statements I suggest to add methods to StorIOSqlite like compiledExecute, compiledUpdateDelete, compiledInsert that will take a special type of resolver to bind arguments. @artem-zinnatullin @karlicoss @thevery any thought? Refs #427

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
artem-zinnatullincommented, Nov 1, 2016

Hm. I was thinking about different implementation: on the Query + StorIOSQLite level.

Since our Queries are immutable, we can actually create precompiled statement per query (and as ThreadLocals if needed) and store them as as fixed size LIFO map in SQLiteOpenHelper so if we have precompiled statement for Query — use it, otherwise — precompile and use it!

I don’t want to add any new public API for this feature if possible.

Does it sound ok? Please cc Stas, also known as “Stas — DB EXPERT”, here

0reactions
artem-zinnatullincommented, Nov 13, 2016

add this feature to v1.12.0 as an experimental one (similar approach as new features are introduces to RxJava library), which could be enabled by users who looks for performance boost and it could be turned on by default for later versions. What do you think?

SGTM, @nikitin-da you’ll be able to test it in Yandex.Mail since it uses DB all the time and see if it increases performance or not!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Prepared Statements - JDBC Basics - Oracle Help Center
This JDBC Java tutorial describes how to use JDBC API to create, insert into, update, and query tables. You will also learn how...
Read more >
Support for prepared statements · Issue #4338 · prestodb/presto
We'd like to add support for prepared statements in Presto. See the plan below and let me know if you have any comments...
Read more >
Dolt Supports Prepared Statements | DoltHub Blog
Prepared statements are a way for a SQL client to optimize the performance ... Adding support for prepared statements in Dolt was relatively ......
Read more >
Using prepared statement support - Amazon Redshift
The Amazon Redshift JDBC driver supports prepared statements. You can use prepared statements to improve the performance of parameterized queries that need to ......
Read more >
PRECOMPILE or PREP command - IBM
The PRECOMPILE command processes an application program source file containing embedded SQL statements. A modified source file is produced, containing host ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found