Cost between using a android rawquery and a normal query on android
I want to know which is more ef开发者_高级运维ficient, a raw query or a normal query on android databases. I know the normal query is probably more efficient but when it comes to efficiency would there be a big performance drop if i were to use raw queries?
Every time you have a question of performance you should just go and measure.
As for the particular situation, you can think that normal query is a raw query with additional string concatenations, which count is equal to the number of params of your query. It means, that unless you have thousands of parameters in your query you won't notice any significant issues.
As the other side normal queries use PreparedStatements, they are more safe, and particularly always are recommended to use.
精彩评论