Recent

Author Topic: Sqldb vs Zeoslib  (Read 13746 times)

cahaya

  • New member
  • *
  • Posts: 8
Sqldb vs Zeoslib
« on: December 12, 2014, 07:05:36 pm »
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

  • Sr. Member
  • ****
  • Posts: 409
  • OS:Win7 64bit / Lazarus 1.4
Re: Sqldb vs Zeoslib
« Reply #1 on: December 12, 2014, 07:35:09 pm »
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
« Last Edit: December 12, 2014, 07:57:49 pm by Never »
Νέπε Λάζαρε λάγγεψων οξωκά ο φίλοσ'ς αραεύσε

SunyD

  • Guest
Re: Sqldb vs Zeoslib
« Reply #2 on: December 12, 2014, 09:27:41 pm »
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

  • New member
  • *
  • Posts: 8
Re: Sqldb vs Zeoslib
« Reply #3 on: December 13, 2014, 02:51:01 am »
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

  • Full Member
  • ***
  • Posts: 145
Re: Sqldb vs Zeoslib
« Reply #4 on: December 13, 2014, 01:35:20 pm »
@cahaya

Do Zeos compile only for Oracle, or for all databases?

Michal

SunyD

  • Guest
Re: Sqldb vs Zeoslib
« Reply #5 on: December 13, 2014, 08:01:38 pm »
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

  • New member
  • *
  • Posts: 8
Re: Sqldb vs Zeoslib
« Reply #6 on: December 22, 2014, 04:25:04 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

  • Full Member
  • ***
  • Posts: 145
Re: Sqldb vs Zeoslib
« Reply #7 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

cahaya

  • New member
  • *
  • Posts: 8
Re: Sqldb vs Zeoslib
« Reply #8 on: December 23, 2014, 02:14:49 pm »
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.

Hi Soner,

For sqlite, 1 connection only 13Mb, but for oracle connection around 40Mb.

cahaya

  • New member
  • *
  • Posts: 8
Re: Sqldb vs Zeoslib
« Reply #9 on: December 23, 2014, 02:26:12 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

  • New member
  • *
  • Posts: 8
Re: Sqldb vs Zeoslib
« Reply #10 on: December 24, 2014, 04:17:43 am »
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

  • Full Member
  • ***
  • Posts: 145
Re: Sqldb vs Zeoslib
« Reply #11 on: December 24, 2014, 10:39:07 am »
@cahaya,

Have you checked what size are your Oracle client library?

Michal

cahaya

  • New member
  • *
  • Posts: 8
Re: Sqldb vs Zeoslib
« Reply #12 on: December 25, 2014, 05:56:17 pm »
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

  • Full Member
  • ***
  • Posts: 145
Re: Sqldb vs Zeoslib
« Reply #13 on: December 31, 2014, 01:54:25 pm »
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#p36712

Michal
« Last Edit: December 31, 2014, 03:16:25 pm by miab3 »

 

TinyPortal © 2005-2018