[firebird-support] Re: Firing event when deleting in MON$ATTACHMENTS

2017-10-22 Thread respekt...@post.cz [firebird-support]
Hello

There is BEFORE_DISCONNECT trigger - try it.

You cannot (as I think) stop disconnection - but you can reconnect in your 
application

Tom

RE: [firebird-support] Firing event when deleting in MON$ATTACHMENTS

2017-10-22 Thread 'Leyne, Sean' s...@broadviewsoftware.com [firebird-support]


> I am deleting user connected with:
> DELETE FROM MON$ATTACHMENTS WHERE MON$ATTACHMENT_ID =
> :ID_CONNECTION;
> I need to use POST_EVENT in order to notify user that he has been
> disconnected but don't found a trigger for MON$ATTACHMENTS to do it.  Can
> you please help me ?

AFAIK, it is not possible to do what you want.

Once you have deleted the connection, all communication to the client is 
stopped.


Sean



[firebird-support] Firing event when deleting in MON$ATTACHMENTS

2017-10-22 Thread m_brahi...@yahoo.fr [firebird-support]
Hello,

I am deleting user connected with:
 DELETE FROM MON$ATTACHMENTS WHERE MON$ATTACHMENT_ID = :ID_CONNECTION;

 I need to use POST_EVENT in order to notify user that he has been disconnected 
but don't found a trigger for MON$ATTACHMENTS to do it.  Can you please help me 
? 
Thanks


  


Re: [firebird-support] Index process in Firebird 2.1.4

2017-10-22 Thread Ann Harrison aharri...@ibphoenix.com [firebird-support]


> On Oct 19, 2017, at 11:45 PM, gn7s...@gmail.com [firebird-support] 
>  wrote:
> 
> 
> 
> Hi!
> I'm going to develop a commercial program with Firebird2.1, in Delphi7.
> 
As noted, 2.1 is obsolete. 
> I want to know whether the following index is picked by the optimizer.
> 
> [The first question] 
> CREATE INDEX IDX1 ON PROJECT(A)
> CREATE INDEX IDX2 ON PROJECT(B)
> CREATE INDEX IDX3 ON PROJECT(C)
> CREATE INDEX IDX4 ON PROJECT(D)
> 
> SELECT * PROJECT WHERE A=1 and B=2 and C=3 and D=4
> 
> The optimizer would be choose the fastest way among table-full-scan and four 
> indexs. Is this right?
> 

If columns A, B, C, and D all have a lot of different values - think of street 
addresses rather than eye color - then Firebird can use all four indexes. It 
builds bit maps of matching records from each index and finds records that 
match all the criteria. 

Note that the SHOW PLAN command shows only the first index for any table - 
maybe newer versions show more...

Good luck,

Ann

> 
> [The second question] 
> CREATE INDEX IDX1 ON PROJECT(A)
> CREATE INDEX IDX2 ON PROJECT(B,C,D)
> 
> SELECT * PROJECT WHERE A=1 and B=2 and C=3 and D=4
> 
> The optimizer would be choose the fastest way among table-full-scan and two 
> indexs. Is this right?
> 
> 
> 
> 
> 
> [The third question] 
> CREATE INDEX IDX ON PROJECT(B,C,D)
> 
> SELECT * PROJECT WHERE A=1 and B=2 and C=3 and D=4
> 
> The optimizer would be c hoose the fastest way among table-full-scan and IDX 
> index. Is this right?
> 
> 
> 
> Please tell me.
> Thanks!
> 
> 
> 
>