Hello, I tried to store always the same data. My Row has 5 columns and in every column i used same values for each row. I used the following method to generate the fakedata
public ArrayList<MyData> generateFakeData(int anzahl, int byteanzahl) { //generiert mit Fakedaten eine Variable von unserem Datentyp, die ?bergeben Zahl bestimmt die Anzahl der Datenbytes ArrayList<MyData> returndata = new ArrayList<MyData>(); MyData fakedata; byte blaByte = 1; byte[] dataarray = new byte[byteanzahl]; if(byteanzahl > 0) { for(int i = 0; i<byteanzahl; i++) { dataarray[i] = blaByte; } } else { dataarray = null; } for(int i = 0; i < anzahl; i++) { fakedata = new MyData(); fakedata.intKey = i; fakedata.strKey = "A.B:" + i; fakedata.canID = 100; fakedata.rtr = blaByte; fakedata.ide = blaByte; fakedata.timestamp=100; fakedata.dlc=byteanzahl; fakedata.data=dataarray; returndata.add(fakedata); } return returndata; } I hope this makes more clearly what I mean. Michael -----Urspr?ngliche Nachricht----- Von: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-users-bounces at mailinglists.sqlite.org] Im Auftrag von Simon Slavin Gesendet: Dienstag, 30. Juni 2015 16:22 An: General Discussion of SQLite Database Betreff: Re: [sqlite] Question about getting size of stored data On 30 Jun 2015, at 1:44pm, m.g.001 <m.g.001 at web.de> wrote: > I tried the following, but it returns different sizes every time. But > my test data is the same so I think it should have the same size. What do you mean by "my test data is the same" ? Are you saying you have a table with two rows which have identical values ? Because SQLite uses different storage sizes for different integers. So, for example, it takes more memory to store the number '2' than it does to store the number '1'. Simon. _______________________________________________ sqlite-users mailing list sqlite-users at mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users