Hi all,
I am using SQLite in a Java application through Zentus. In this context I need to save and queries Java long
values in my database. Coming from other RDBMS I created table as following to stor long values:
CREATE TABLE myTable (id INTEGER PRIMARY_KEY, longValue LONG)
This solution produces the excepted behavior but after reading the SQLite documentation on data types I understood that my LONG type has the same effect than using TEXT => My longValues are stored as text.
I then decided to change this to INTEGER (which length is variable and can store up to 64 bits integers which is the length of Java long) in order to have cleaner code and may be to save some disk space and to increase performances because my longValues are inserted and queried as long
.
After looking at performances and size of the created databases I am not able to see any difference between:
CREATE TABLE myTable (id INTEGER PRIMARY_KEY, longValue LONG)
and
CREATE TABLE myTable (id INTEGER PRIMARY_KEY, longValue INTEGER)
Any comments, experiences or feelings on the subject ??
Thanks in advance
Manu