Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Stefan Weideneder — — source: Informix-list mailing list archive (1991-1998)
Laurence M. Cerier wrote:
>
> We are using version 7.2 on HP-UX 10.10, and would like to know if there is
> any way to access to "cost" (from the optimizer) of a query while the query
> is executing without having the explain plan written out to a dataset.
>
> We are trying to develop a quey govenor that can be used to detect
> potentially long running queries and cancel them (so they can be run at a
> better time) before flooding the system.
Hi,
I didn't check whether you can retrieve the information from the
sysmaster:sqexplain.sqx_estcost column. Possibly this information
can be only retrieved, when you SET EXPLAIN ON.
But each programmer can give you the information. The information
will be stored in the SQLCA.SQLERRD[4] record, or sqlca.sqlerrd[3]
element. ( 4GL / ESQL-C ). This information can be picked up
immediately after a PREPARE ( without any questionmark ) or after
your OPEN cursor statement. ( See also: OPEN ... WITH REOPTIMIZATION ).
Bye
Stefan
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.