Using bind variable with 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.
精彩评论