----- Original Message -----
From: <jwharton@ibo...>
> The schema cache simply runs queries against the metadata and then stores
the information in plain text files in the
> directory you put into the program. If the files in the folder are deleted
then the queries are run again and the files are
> re-generated. If metadata changes you need to delete those files to get
them refreshed. This way, on subsequent times
> running the application, instead of running the queries for metadata
information it grabs it out of the local text files.
>
> There is a feature I have tried so that updating local cache files is
automatic. Each time a new connection is made there
> is a check for a value of schema cache version number. If the table is not
there then the error is igored. If it is there a
> value is returned and it is checked against the cache. If different from
what is stored in the cache then it will regenerate
> the cache files.
>
We noticed that id doesn't update the schema cache if the files are not
there until a query that actually uses it is prepared.
And even then only the information needed by the query is downloaded and
next time there will still be more schema cache to download.
Another thing is what information from the RDB$ tables is downloaded.
Example:
In order to present acurately the source of a table information like domain
and domain defaults are needed.
If you look at the source code for generating a table you'll see this
problem:
CREATE TABLE TEST (
FIELD1 MYDOMAIN /* Defaulted */
)
the domain is:
CREATE DOMAIN MYDOMAIN VARCHAR( 10 )
default 'cool';
but the real source of the table is:
create table test(field1 mydomain default 'hurray')!!!
If I copy what IBO tells me and rely on it to be true I brake my table
loosing the real default.
To continue the idea...
Does IBO stop quering RDB$ after the schema cache is generated or it still
makes queries on it when it needs something that is not in the schema cache?
> Jason Wharton
>
Calin Pirtea
Medisys Australia Pty Ltd
www.medisys.com.au