Sqldb vs Zeoslib lazarus / 63-Database ---------------------------------------------------------------------- cahaya · 2014-12-12 18:05 Hi all, I test query 33.402 records again oracle xe 64 bit. I use laptop core i5 asus zenbook. Sqldb result around 2 second and zeoslib around 1 second. But zeoslib use memory bigger than sqldb. Only open 1 connection it use 43.416Kb. Quite big if we use it for cgi application. 1 request will eat memory 42Mb. I try to install odac for lazarus but it failed. I can not compile it. Anybody have try it ? Thank you. ---------------------------------------------------------------------- Never · 2014-12-12 18:35 in general if you mostly store huge binary data in the db sooner or later you will face this  problem especialy with this amount of records..... 30000+ records is not human readble thought if you are going to make use of this db on net ( but for local use the principle is the same also)  make use of a paging algorithm and fetch and display 5-10-20 records at a time stress your system only IF you can't do other ways ---------------------------------------------------------------------- SunyD · 2014-12-12 20:27 Zeoslib fetches all resulting data rows from Server. Sqldb only 20. Maybe you should change TZQuery.FetchRow property. TZQuery.FetchRow := 0; //fetches all data Rows from Server TZQuery.FetchRow > 0; //fetches only the nummer you entered. ---------------------------------------------------------------------- cahaya · 2014-12-13 01:51 Hi Never and Soner, It is just a test. Event if you open the connection without query, Zeos still use around 42Mb and Sqldb around 32Mb. Did you notice this before ? If you create a cgi program, than it eat much of your server resource. I test 30K records just for test to make sure who is faster. That's way use quite big records. ---------------------------------------------------------------------- miab3 · 2014-12-13 12:35 @cahaya Do Zeos compile only for Oracle, or for all databases? Michal ---------------------------------------------------------------------- SunyD · 2014-12-13 19:01 I can't say about CGI-Programs or Oracle DB but here is some RAM usage report from my 3 programs with ZEOS-Components. I checked ram usage of 3 applications. All 32Bit, Windows XP and Zeos 7.1.3a 1. App (GUI-App) Compiled with Delphi 7, TWebbrowser, huge GUI + Variables 12MB database Firebird 2.5 (~50.000 datarows in 24 Tables) RAM usage: ~30MB (most of them used by TWebbrowser) 2. App (GUI-App) Compiled with Lazarus 1.3 + fpc 2.6.4, (with embedded Forms, Lazreport, multilanguage support) 85 KB Sqlite3 database (~560 datarows in 11 tables) RAM usage: ~20MB 3. App (GUI-App) Like 2.App but with Firebird 2.5 Database from first app. RAM usage: ~18MB at start, ~22-25MB after opened tabbed forms with db- components. ---------------------------------------------------------------------- cahaya · 2014-12-22 15:25 Quote from: miab3 on December 13, 2014, 01:35:20 pm@cahaya Do Zeos compile only for Oracle, or for all databases? Michal Are you ask me Zeos feature or my test specification ? In my test, I use zeos for oracle db only. ---------------------------------------------------------------------- miab3 · 2014-12-22 18:45 @cahaya, Did you notice something like that in Zeos.inc? Code: [Select]// Uncomment these defines to disable some DB drivers (reduce binary size) {.$DEFINE ZEOS_DISABLE_MYSQL} {.$DEFINE ZEOS_DISABLE_POSTGRESQL} {.$DEFINE ZEOS_DISABLE_DBLIB} {.$DEFINE ZEOS_DISABLE_ADO} {.$DEFINE ZEOS_DISABLE_INTERBASE} {.$DEFINE ZEOS_DISABLE_SQLITE} {.$DEFINE ZEOS_DISABLE_ORACLE} {.$DEFINE ZEOS_DISABLE_ASA} About what I asked. Michal ---------------------------------------------------------------------- cahaya · 2014-12-23 13:14 Quote from: Soner A. on December 13, 2014, 08:01:38 pmI can't say about CGI-Programs or Oracle DB but here is some RAM usage report from my 3 programs with ZEOS-Components. I checked ram usage of 3 applications. All 32Bit, Windows XP and Zeos 7.1.3a 1. App (GUI-App) Compiled with Delphi 7, TWebbrowser, huge GUI + Variables 12MB database Firebird 2.5 (~50.000 datarows in 24 Tables) RAM usage: ~30MB (most of them used by TWebbrowser) 2. App (GUI-App) Compiled with Lazarus 1.3 + fpc 2.6.4, (with embedded Forms, Lazreport, multilanguage support) 85 KB Sqlite3 database (~560 datarows in 11 tables) RAM usage: ~20MB 3. App (GUI-App) Like 2.App but with Firebird 2.5 Database from first app. RAM usage: ~18MB at start, ~22-25MB after opened tabbed forms with db- components. Hi Soner, For sqlite, 1 connection only 13Mb, but for oracle connection around 40Mb. ---------------------------------------------------------------------- cahaya · 2014-12-23 13:26 Quote from: miab3 on December 22, 2014, 07:45:18 pm@cahaya, Did you notice something like that in Zeos.inc? Code: [Select]// Uncomment these defines to disable some DB drivers (reduce binary size) {.$DEFINE ZEOS_DISABLE_MYSQL} {.$DEFINE ZEOS_DISABLE_POSTGRESQL} {.$DEFINE ZEOS_DISABLE_DBLIB} {.$DEFINE ZEOS_DISABLE_ADO} {.$DEFINE ZEOS_DISABLE_INTERBASE} {.$DEFINE ZEOS_DISABLE_SQLITE} {.$DEFINE ZEOS_DISABLE_ORACLE} {.$DEFINE ZEOS_DISABLE_ASA} About what I asked. Michal Thank you miab3. How to use that configuration file. Sorry newbie for zeos and lazarus. But fcgi program around 2,7Mb in size. ---------------------------------------------------------------------- cahaya · 2014-12-24 03:17 Hi Miab3, I have test your suggestion. I use menu Run->Clean up build files. Don't know whether there is a better ways and simple. I will try to compile ZAbstractConnection only. It reduce binary size from 2,7Mb to 1.850Kb for my fcgi program, and it reduce memory to 35.972Kb. And for sqlite, it only use 5.176Kb from around 13.000Kb. But it is still quite big. I have a multithread program use BDE (Delphi 7). There are around 30 threads and it use memory smaller than my fcgi (lazarus). Zeos it very fast compare to BDE, but memory issue should be a problem for cgi apps. ---------------------------------------------------------------------- miab3 · 2014-12-24 09:39 @cahaya, Have you checked what size are your Oracle client library? Michal ---------------------------------------------------------------------- cahaya · 2014-12-25 16:56 Hi Michal, Merry christmas. Btw, I managed to test sqldb 64 oraconnection. It use memory very small compare to zeos. I test to open 1 connection only without query, it only use around 6Mb. Very small, but quite slow compare zeos. I just know, you are tester team of zeos. Glad to see you here. I use oracle instant client 11.2. I don't know how to use zeos in 64bit world. Do you have any links to learn ? Any possibilities zeos use big memory because zeos 32bit code use in 64bit OS ? Learn from sqldb, memory size is reduced 80%, between 32bit to 64bit in 64bit OS. ---------------------------------------------------------------------- miab3 · 2014-12-31 12:54 For both 32 and 64 bit you can indicate the proper location of the Oracle client in LibraryLocation. The ZEOS 64-bit Oracle application also uses less memory(at the beginning). Recent tests (basically the final version ZEOS 7.2): http://zeoslib.sourceforge.net/viewtopic.php?f=40&t=3795&start=315#p36 712 Michal