Re: Set explain utility
Posted in 1997
Nigel Gall wrote:
>
> I do not know of any utility that can do this, but since using SET
> EXPLAIN implies optimization of queries in a program, which implies
> access to the source code of a program, why not create your programs in
> a way that allows you to accomplish SET EXPLAIN ON/OFF by using an
> environment variable?
>
> For example, at the start of each program you place the following code:
>
> main
>
> define setexplain char
>
> let setexplain = fgl_getenv("SETEXPLAIN")
> if setexplain = "Y" then
> set explain on> else
> set explain off
> end if>
> ...
>
> end main
>
> This way, when you want to test, you simply set your UNIX environment
> variable SETEXPLAIN to Y and you're happy!
>
> Best regards,
> Nigel
>
> MarkDenham@15.96.48.192.in-addr.arpa wrote:
Hi,
Try to use signal handling instead of your environment variable.
For instance: 1st signal will enable SET EXPLAIN, 2nd one will
disable SET EXPLAIN. I think it's better not to log the complete
program, don't you ?
Bye
Stefan