Page 1 of 1
Zeos 6.6.6 + Delphi2006: need a lot of memory
Posted: 18.12.2011, 22:18
by Sapiem
I have been working with Delphi 2006 + Zeos 6.6.6 and use an encrypted 16Mb database with SQLite3 protocol (about 15000 records).
The executable is about 5Mb, but when a run it, it consume 15Mb, but when I open the encrypted database it use 88Mb !!!!
Why too memory...?
Posted: 23.12.2011, 18:23
by Sapiem
Deleting all Ztables and using only ZQuerys I can decrease all the memory consume up to 41Mb.
If you use Absolute Database, the same code and the same database structure and data, it only consume up to 17Mb, including 6 ABSTables opened with MasterSource option betwen them.
Why SQLite consume that?
Posted: 30.12.2011, 16:27
by mdaems
Probably it's zeoslib that reserves more memory than needed for the data in the tables. It reserves the full capacity of string fields (eg 255 bytes for varchar(255)). So if you have a lot of big string fields which you rarely complete completely you'll see that much waste. You could also try to create forward only readonly datasets. These might waste less cache memory as they don't need an update cache.
Mark
Posted: 03.01.2012, 14:44
by Sapiem
But I need search and update records in database all the time, so I prefer use ZQuery, not readonly datasets.
It´s different varchar(255) and TEXT fields? I mean, about this that you explain with the cache memory?
Thanks.
Posted: 01.03.2012, 00:18
by mdaems
I'd say yes, it's different as I think text is handled as a blob, but I don't know if that's more efficient in your case. You'll have to test that.
Mark
Posted: 01.03.2012, 13:17
by Sapiem
It's less memory consumer, but not mark the diferent. Just we need to adapt to use it in this way, ja.
Thanks
Posted: 15.03.2012, 00:30
by mdaems
Does that mean: 'Yes, TEXT fields use less memory and behaviour is identical, so we will use TEXT fields'??
Mark