Re: SET PDQPRIORITY in an IF...THEN block?
Posted in 2012
I don't know. Marco is correct as far as it goes, but I'm not sure whether
embedded SET PDQPRIORITY commands will do that.
One way to check.. create a procedure that selects its sysmaster:syssdblock
record before and after the IF statement that selects the SET PDQPRIORITY
and write the results to unload files for comparison. Here's the query:
select sdb_pdq_prio_req, sdb_pdq_priority
from sysmaster:syssdblock
where sdb_sessionid = dbinfo( 'sessionid');
If the set pdqpriority inside the procedure affects the whole procedure
then the priority before the SET command is executed will be the same as
the one after, ie the one set by the command. If the priority before is
the default of zero or of the current setting of the calling session, then
it's OK. This will also tell you if the set pdqpriority is effective
inside the session and you can check the same query after the procedure
exits in the session to see if the priority returns to default by itself or
if you will have to reset it after calling the function.
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on my employer, Advanced DataTools, the IIUG, nor any
other organization with which I am associated either explicitly,
implicitly, or by inference. Neither do those opinions reflect those of
other individuals affiliated with any entity with which I am affiliated nor
those of the entities themselves.
On Thu, Aug 2, 2012 at 4:23 PM, Marco Greco <marco@4glworks.com> wrote:
>
>
> On 02/08/12 18:59, John Hardin wrote:
> > All:
> >
> > I have some SP code that has a SET PDQPRIORITY N directive inside an
> > IF ... THEN block that checks the application configuration table to see
> > whether PDQ is enabled.
> >
> > Can anyone (Art, ideally) confirm whether or not this will actually work
> > to control PDQ and will NOT use PDQ if the IF block evaluates to false? I
> > am getting objections to this from someone who seems to believe that the
> SP
> > will use PDQ if a SET PDQPRIORITY directive appears anywhere in it at
> > compile time...
> >
> > TIA
> >
> That somebody is correct. SP's run with the PDQ setting in effect at
> creation
> / update statistics time.
> --
> Ciao,
> Marco
>
> ______________________________________________________________________________
> Marco Greco /UK /IBM Standard disclaimers
> apply!
>
> Structured Query Scripting Language
> http://www.4glworks.com/sqsl.htm
> 4glworks
> http://www.4glworks.com
> Informix on Linux
> http://www.4glworks.com/ifmxlinux.htm
> _______________________________________________
> Informix-list mailing list
> Informix-list@iiug.org
> http://www.iiug.org/mailman/listinfo/informix-list
>