Subject Re: [IBO] Schemacache
Author Gerhard Knapp
Hello Mikey,

testscenario on a fast machine (6 core, very fast database SSD, 32 GB mem)
Firebirdserver and client on same machine:

case 1:  no Schemachachedir defined:  8 seconds to connect
case 2: Schemacachedir defined on c:\schema:   8 seconds do connect (and files are saved in c:\schema)
case 3: Delete the files in c:\schema:  8 seconds do connect (and files recreated)
case 4: Schemacachedir exists, files in it exists:  1 second do connect

I think:
On every connection the full schema will be loaded from the Databaseserver (can be 3 MB and more filesize on some dbs)
If no dir defined, maybe in the memory.
If there is a Schemacachedir filled with data, the connection uses only 1 second because of reading the prepared
Schema in the Schemacachedir.

So my question is wrong.
It should be:

How can i prevent getting the full db-schema from the database if i need in the client e.g. only three of 1000ts tables.

best regards
Gerhard





Am 29.03.2018 um 14:01 schrieb Michel LE CLEZIO mlcvista@... [IBObjects]:
 
Hello Gerhard,

Strange.... I use the last version, with SchemaCacheDir empty : no files are created.... even with IB_Connection... (but I have only 80 Tables... in my database).
What is the directory where files are created ? A Temp directory of Windows or in a directory of your application ?

Best Regards,
Mikey





Le ‎jeudi‎ ‎29‎ ‎mars‎ ‎2018‎ ‎11‎:‎00‎:‎07‎ ‎CEST, Gerhard Knapp gerhard.knapp@... [IBObjects] <IBObjects@yahoogroups.com> a écrit :


 

Thanks Mikey for answering ....

yes, what you write here, is what i expected.

But if you use the IB_Connection (and not IBODatabase) then it seems to be created everytime also if the
SchemaCacheDir:= is empty.

And if you have a database with 1000ts of tables, but only use some of them in the client, it uses
many seconds to save all the chemadata files on the client computer.
This issue makes the user experience to start a programm very bad.

In former versions i didn't had this problem.
I cannot say, what newer version changed this behaviour.

But in the meantime this is very boring.

best regards
Gerhard

Am 27.03.2018 um 16:39 schrieb Michel LE CLEZIO mlcvista@... [IBObjects]:
 
Hello,

May be I'm wrong, but by default,  the 

IBODatabase1.SchemaCacheDir:= is empty
So no files are created on client side...

Files are created only if it is not empty...
IBODatabase1.SchemaCacheDir:='C:\MYSOFT DIRECTORY\SCHEMA CACHE DIR';

If the files doesn't exists, the first connection, will produce the files... After for other connection, those files will be used (it's faster tu uses them on the client, than to load informations on the server).
But if the schema of your database change, delete them, in order to upgrade them at the next connection...

This is how I've understand the SchemaCacheDir property...

With best Regards,
Mikey


Le ‎mardi‎ ‎27‎ ‎mars‎ ‎2018‎ ‎10‎:‎59‎:‎41‎ ‎CEST, Gerhard Knapp gerhard.knapp@... [IBObjects] <IBObjects@yahoogroups.com> a écrit :


 


sorry if i ask a stupid question...

But is it possible to get a firebird connection without creating the schemacache on the client side?
Even i let the Schemacacedir empty i get a lot of chemacache data to the client.
(needs many seconds of waiting)

best regards
Gerhard