Optimizer directives in 4gl
Posted in 2000
Topics: Performance & Tuning, Connectivity: ESQL/C, 4GL & Embedded SQL
Quick question for the 4gl experts: we are having trouble due to our 4gl program queries ignoring optimizer directives. EXEC SQL SET EXPLAIN ON; shows directives being ignored on prepared queries and cursors. We have an HP9000/Hp-Unix that uses informix 7.3 Dynamic Server. We would appreciate any help on how to go about figuring out how to make the optimizer directives work. Eg, What environment variables to start checking. Do we need a particular version of 4gl for the directives to work? Thanks, Han Sent via Deja.com http://www.deja.com/ Before you buy.
hanhwe_kim@yahoo.com wrote: > Quick question for the 4gl experts: > > we are having trouble due to our 4gl program queries ignoring > optimizer directives. EXEC SQL SET EXPLAIN ON; shows directives > being ignored on prepared queries and cursors. > > We have an HP9000/Hp-Unix that uses informix 7.3 Dynamic Server. > > We would appreciate any help on how to go about figuring out > how to make the optimizer directives work. Eg, What environment > variables to start checking. Do we need a particular version of > 4gl for the directives to work? Unless you're writing your queries correctly and using I4GL 7.3 (or writing them correctly and using PREPARE), yes, your optimizer directives will be ignored. SQL SELECT {+ Hint } * FROM SomeWhere WHERE <some-condition> END SQL -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v1.00.PC1 -- see http://www.perl.com/CPAN #include <disclaimer.h>
Jonathan Leffler wrote: > > hanhwe_kim@yahoo.com wrote: > > > Quick question for the 4gl experts: > > > > we are having trouble due to our 4gl program queries ignoring > > optimizer directives. EXEC SQL SET EXPLAIN ON; shows directives > > being ignored on prepared queries and cursors. > > > > We have an HP9000/Hp-Unix that uses informix 7.3 Dynamic Server. > > > > We would appreciate any help on how to go about figuring out > > how to make the optimizer directives work. Eg, What environment > > variables to start checking. Do we need a particular version of > > 4gl for the directives to work? > > Unless you're writing your queries correctly and using I4GL 7.3 (or > writing them correctly and using PREPARE), yes, your optimizer > directives will be ignored. > > SQL > SELECT {+ Hint } * FROM SomeWhere WHERE <some-condition> > END SQL > Also, what is you ONCONFIG variable DIRECTIVES set to? -- John Carlson Informix DBA WHSmith USA #include std_disclaimer.h /* These are my opinions, not my company's opinion */