Using Informix SET PDQPRIORITY SQL statement within a universe.
We are building universes on an IBM Informix V10.0 database. Informix has an SQL statement called SET PDQPRIORITY that is an extension to the ANSI/ISO standard for SQL. This statement allows an application to set the query priority level dynamically. For instance, to use this statement in raw SQL the code would look like:
SET PDQPRIORITY 40;
SELECT * FROM table1;
I am tying to establish if the SET PDQRIORITY can be set somewhere within a universe so that it can be used on all queries run against the universe. Is it possible to set it as a new SQL generation parameter and if so how do I enforce it gets used?
PDQPRIORITY can also be set as an environment variable on the machine, but this would cause all universes to use the same priority level.
Pierpaolo VEZZOSI replied
since XI3.1 you can use a new Universe parameter called Begin_SQL.
You set its value in the Universe parameters list and this text will be sent to the database before each query.
In your case you should set:
Begin_SQL = SET PDQPRIORITY 40;
and then create your universe as usual.
You should test this to make sure that Informix accepts the command the way we send it.
Let us know if it works.