On Tue, Apr 7, 2009 at 7:04 PM, Vinnie <thev...@yahoo.com> wrote:
> On the other hand there is some legacy data that I want to store
> using UTF-8. For these fields I will use sqlite3_bind_text(). It is
> possible that in a single INSERT statement there are both UTF-16
> and UTF-8 (wchar_t and char) fields present.
>
> At no point am I ever constructing SQL statements using a printf()
> style conversion on field data to create the statement.
>
> Am I vulnerable to a performance penalty because of conversions in this 
> scenario?

There is a lot of debate as to whether you lose more in the expanded
storage needs of UTF-16 than you gain in not having to decode the
UTF-8, even for in-memory applications.  For databases, it is almost
always a win to use UTF-8, because you can decode a huge amount of
UTF-8 for the cost of a single seek (bigger databases means more
seeks).  Unless your data is in that subset which codes more space
efficiently in UTF-16 than UTF-8.

-scott
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to