Is it possible to cache metadata instead of reloading it for every query?
Posted: Thu 05 Sep 2019 00:21
Hi,
I noticed IBDAC issues a query requesting metadata information about data field properties every time before issuing SELECT or UPDATE queries. Is it possible to change settings not to do it? Is it possible to load all metadata only once?
To make it more clear this kind of statement is issued before every my SELECT (see below) I'm sure there should be a setting that is causing this. Can I issue this SELECT only once per run or at least once per connection?
SELECT Rel.RDB$FIELD_NAME, Fld.RDB$COMPUTED_BLR, Rel.RDB$DEFAULT_SOURCE, Fld.RDB$DEFAULT_SOURCE FROM RDB$RELATION_FIELDS Rel JOIN RDB$FIELDS Fld ON (Rel.RDB$FIELD_SOURCE = Fld.RDB$FIELD_NAME) WHERE (Rel.RDB$RELATION_NAME = 'PROCPART' ) AND ( (NOT Fld.RDB$COMPUTED_BLR IS NULL) OR (NOT Rel.RDB$DEFAULT_SOURCE IS NULL) OR (NOT Fld.RDB$DEFAULT_SOURCE IS NULL))
Another question:
Is there an event or component I could use to log all issued queries (IBDAC internal and software) and data and parameter values into my own file? The free DB monitor is helpful but harder to use than looking at text logs.
Thanks in advance,
Alex Liberov.
I noticed IBDAC issues a query requesting metadata information about data field properties every time before issuing SELECT or UPDATE queries. Is it possible to change settings not to do it? Is it possible to load all metadata only once?
To make it more clear this kind of statement is issued before every my SELECT (see below) I'm sure there should be a setting that is causing this. Can I issue this SELECT only once per run or at least once per connection?
SELECT Rel.RDB$FIELD_NAME, Fld.RDB$COMPUTED_BLR, Rel.RDB$DEFAULT_SOURCE, Fld.RDB$DEFAULT_SOURCE FROM RDB$RELATION_FIELDS Rel JOIN RDB$FIELDS Fld ON (Rel.RDB$FIELD_SOURCE = Fld.RDB$FIELD_NAME) WHERE (Rel.RDB$RELATION_NAME = 'PROCPART' ) AND ( (NOT Fld.RDB$COMPUTED_BLR IS NULL) OR (NOT Rel.RDB$DEFAULT_SOURCE IS NULL) OR (NOT Fld.RDB$DEFAULT_SOURCE IS NULL))
Another question:
Is there an event or component I could use to log all issued queries (IBDAC internal and software) and data and parameter values into my own file? The free DB monitor is helpful but harder to use than looking at text logs.
Thanks in advance,
Alex Liberov.