http://www.perlmonks.org?node_id=863825


in reply to Re: SQLite and Storable: is "Text" okay?
in thread SQLite and Storable: is "Text" okay?

If you're using SQLite 3, the TEXT type stores data UTF encoded

I don't see SQLite performing any encoding conversion, so that's surely false. It stores whatever bytes it received, whether it's encoded using UTF-8 or not.

The difference will surface when someone tries to perform text operations (e.g. sorting) on the field.

BLOB is definitely more appropriate here, seeing as the data is binary, but it's my understanding that the type of a column doesn't matter in SQLite if all you do with the column is store and fetch.

If it does do encoding conversions, you need to stay away from TEXT for Storable data. You'll potentially waste space and time.

I would still pick TEXT, because it describes the data the best.

Storable returns binary data. BLOB should be picked because it describes the data best.