Re: [firebird-support] Automatic Firing of Query.

2017-08-17 Thread Tomasz Tyrakowski t.tyrakow...@sol-system.pl [firebird-support]
On 17.08.2017 at 07:59, anshuman.na...@airtelmail.in [firebird-support] 
wrote:
> 
>   I would like some help to identify as to why and from where the following 
> query is getting executed on its own at particular intervals.   We have Thick 
> Client Application written using Delphi and Firebird (2.5.2).  The query is:
>
>   Select F.RDB$COMPUTED_BLR, F.RDB$DEFAULT_VALUE, R.RDB$FIELD_NAME from 
> RDB$RELATION_FIELDS R, RDB$FIELDS F where R.RDB$RELATION_NAME = ? and 
> R.RDB$FIELD_SOURCE = F.RDB$FIELD_NAME and ((not F.RDB$COMPUTED_BLR is NULL) 
> or  (not F.RDB$DEFAULT_VALUE is NULL)).
>
>   How can I make this execution stop as its causing me performance issues.

That query is probably being fired by the database access library you 
use in your application. Depending on which one it is (IBX, IBO, BDE, 
other), I'd suggest looking for the answer in places related to the 
particular DB access components. IMO Firebird itself has nothing to do 
with this query. Most of the DB component libraries query the system 
tables to determine DB structure and types of fields. In your particular 
case the query seems to get all fields from a particular table, which 
have default values, but why it is needed for is hard to tell.
Does it ask every time for the same table (can you peek at the actual 
value provided for "?" in R.RDB$RELATION_NAME = ?)? If so, maybe try to 
look for inserts/updates your app is making to that table and try to 
correlate them with appearance of this query - maybe you omit a field in 
an insert and the DB library tries to check whether the omitted field 
has a default value. But that's jus pure guessing.
When you wrote the query was being executed on its own, did you mean it 
gets fired even when your app is doing nothing, or just that it's an 
excess query not originating from your code?

Sorry I can't be more specific, but maybe my remarks will point you in 
the right direction.

regards
Tomasz

-- 
__--==--__
__--== Tomasz Tyrakowski==--__
__--==SOL-SYSTEM==--__
__--== http://www.sol-system.pl ==--__
__--==--__


[firebird-support] Automatic Firing of Query.

2017-08-17 Thread anshuman.na...@airtelmail.in [firebird-support]

 I would like some help to identify as to why and from where the following 
query is getting executed on its own at particular intervals.   We have Thick 
Client Application written using Delphi and Firebird (2.5.2).  The query is:
  
 Select F.RDB$COMPUTED_BLR, F.RDB$DEFAULT_VALUE, R.RDB$FIELD_NAME from 
RDB$RELATION_FIELDS R, RDB$FIELDS F where R.RDB$RELATION_NAME = ? and 
R.RDB$FIELD_SOURCE = F.RDB$FIELD_NAME and ((not F.RDB$COMPUTED_BLR is NULL) or  
(not F.RDB$DEFAULT_VALUE is NULL)).
  
 How can I make this execution stop as its causing me performance issues.
  
 
 Looking forward to your support