jeudi 22 octobre 2015

TEXT vs BLOB on Android SQLite on coordiantes values

I have a sqlite BD with a table that contains coordinates of a large polyline (about 2000 characters). The structure of BD is:

CREATE TABLE "province" (
    `_id`   INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,
    `_line` TEXT,
);

The format of values of _line is:

lat1,lon1;lat2,lon2;lat3,lon3;lat4,lon4 ...

A little example:

28.164033,-15.709076;28.151925,-15.699463;28.134972,-15.703583;28.121650,-15.707703;28.107115,-15.704956;28.079250,-15.713196;28.067133,-15.735168

sqlite text vs blob

Right now, field _line is TEXT type on SQLite Android database. In my class DAO I parse this string to an ArrayList, thats is a list of points.

My question is, it will be recomended change of _line datatype from TEXT to BLOB? Will be improve the performance?

Aucun commentaire:

Enregistrer un commentaire