Quantcast

MON$Attachment fields vs. RDB$Get_Context("SYSTEM", ....)

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

MON$Attachment fields vs. RDB$Get_Context("SYSTEM", ....)

Leyne, Sean
 
One of my developers was looking for a simple way to determine what Process was the current DB operation related to.
 
I knew that MON$Attachments has a MON$Remote_Process value, so I expected the same details would be available thru RDB$Get_Context("SYSTEM",....) call.  But I was wrong.
 
There are several MON$Attachments columns which are not available, thru the "SYSTEM" namespace:
    - MON$SERVER_PID
    - MON$STATE
    - MON$REMOTE_PID
    - MON$CHARACTER_SET_ID
    - MON$TIMESTAMP
    - MON$GARBAGE_COLLECTION
    - MON$REMOTE_PROCESS
    - MON$STAT_ID
 
Is there a reason why the values could not be added to "SYSTEM" namespace?
 
Without them, it would be necessary to use the MON$ tables, which I have understood to be bad for Classic performance.  Which is something I want to avoid.
 
 
Sean
 
 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MON$Attachment fields vs. RDB$Get_Context("SYSTEM", ....)

Dmitry Yemanov-3
31.03.2017 01:11, Leyne, Sean wrote:
>
> One of my developers was looking for a simple way to determine what
> Process was the current DB operation related to.
>
> I knew that MON$Attachments has a MON$Remote_Process value, so I
> expected the same details would be available thru
> RDB$Get_Context("SYSTEM",....) call.  But I was wrong.

RDB$GET_CONTEXT('SYSTEM', 'CLIENT_PID')
RDB$GET_CONTEXT('SYSTEM', 'CLIENT_PROCESS')

> There are several MON$Attachments columns which are not available, thru
> the "SYSTEM" namespace:
>     - MON$SERVER_PID
>     - MON$STATE
>     - MON$REMOTE_PID
>     - MON$CHARACTER_SET_ID
>     - MON$TIMESTAMP
>     - MON$GARBAGE_COLLECTION
>     - MON$REMOTE_PROCESS
>     - MON$STAT_ID
>
> Is there a reason why the values could not be added to "SYSTEM" namespace?

We add them on demand, based on user requests. I don't think all of them
are really needed.


Dmitry


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MON$Attachment fields vs. RDB$Get_Context("SYSTEM", ....)

Leyne, Sean
Dmitry,

> -----Original Message-----
> From: Dmitry Yemanov [mailto:[hidden email]]
> Sent: Friday, March 31, 2017 1:41 PM
> To: For discussion among Firebird Developers <firebird-
> [hidden email]>
> Subject: Re: [Firebird-devel] MON$Attachment fields vs.
> RDB$Get_Context("SYSTEM", ....)
>
> 31.03.2017 01:11, Leyne, Sean wrote:
> >
> > One of my developers was looking for a simple way to determine what
> > Process was the current DB operation related to.
> >
> > I knew that MON$Attachments has a MON$Remote_Process value, so I
> > expected the same details would be available thru
> > RDB$Get_Context("SYSTEM",....) call.  But I was wrong.
>
> RDB$GET_CONTEXT('SYSTEM', 'CLIENT_PID')
> RDB$GET_CONTEXT('SYSTEM', 'CLIENT_PROCESS')

Thanks, hadn't seen those.

BTW, why would they have names which are different from the names already established in the MON$ table?

> >     - MON$REMOTE_PID
> >     - MON$REMOTE_PROCESS


Sean


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MON$Attachment fields vs. RDB$Get_Context("SYSTEM", ....)

Dmitry Yemanov-3
04.04.2017 16:30, Leyne, Sean wrote:
>
> BTW, why would they have names which are different from the names already established in the MON$ table?
>
>>>     - MON$REMOTE_PID
>>>     - MON$REMOTE_PROCESS

Because the naming mismatch exists since the very beginning
(CLIENT_ADDRESS / MON$REMOTE_ADDRESS) and new values follow this
"tradition".


Dmitry


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MON$Attachment fields vs. RDB$Get_Context("SYSTEM", ....)

Leyne, Sean


> 04.04.2017 16:30, Leyne, Sean wrote:
> >
> > BTW, why would they have names which are different from the names
> already established in the MON$ table?
> >
> >>>     - MON$REMOTE_PID
> >>>     - MON$REMOTE_PROCESS
>
> Because the naming mismatch exists since the very beginning
> (CLIENT_ADDRESS / MON$REMOTE_ADDRESS) and new values follow this
> "tradition".

Well as long as we are being "consistent" ;-]


Sean


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Loading...