开发者

Using bind variable with SQLite on Android

开发者 https://www.devze.com 2023-03-05 19:26 出处:网络
Is there a performance gain when using bind variables when working wi开发者_JAVA技巧th SQLite on Android?

Is there a performance gain when using bind variables when working wi开发者_JAVA技巧th SQLite on Android? Can SQLite reuse parsed queries (like Oracle does) and thus save the SQL parsing time?

Thanks.

Alex


Yes, binding variables in SQLite will give you a performance boost, as you can prepare/compile the statement a single time, then re-use it with bound variables in each iteration of your select/insert/update.

0

精彩评论

暂无评论...
验证码 换一张
取 消