SQLite uses a compressed format to store records (be it rows of a table or 
entries in an index), so the length of a specific record depends on its 
contents.

See https://sqlite.org/fileformat.html

Storing a row of (NULL, NULL, NULL, NULL) takes just 5 bytes, whereas (1024, 
1.234, 'some string', X'0123456789ABCDEF') requires 34 bytes.

The best you can determine is the average length of a record for the dataset 
you have loaded.

-----Ursprüngliche Nachricht-----
Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im 
Auftrag von Deon Brewis
Gesendet: Donnerstag, 23. Jänner 2020 00:45
An: SQLite mailing list <sqlite-users@mailinglists.sqlite.org>
Betreff: [EXTERNAL] [sqlite] Row length in SQLITE

Is there any way to get the length of rows in a table / index in sqlite?

DBSTAT/sqlite3_analyzer --stats almost gives me the information I want, but 
it's an aggregate sum & max per page - I need the data per row (cell).

- Deon

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


___________________________________________
 Gunter Hick | Software Engineer | Scientific Games International GmbH | 
Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O) +43 
1 80100 - 0

May be privileged. May be confidential. Please delete if not the addressee.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to