Re: OPTIMIZER DIRECTIVES IN 4GL
Posted in 1999
Topics: Performance & Tuning, Connectivity: ESQL/C, 4GL & Embedded SQL, Server Administration, Versions, Editions & End-of-Life
I suppose the 4GL compiler wipes out the optimizer directives as it
get them as plain comments. One way to get arround this is to
make a string with your statement, prepare and execute it.
Best Regards,
Octav
On Mon, Dec 20, 1999 at 08:19:02PM +0100, Jorge Lopez wrote:
> Hello.
>
> I can use optimizer directives from dbaccess / Query Language, but
> they don't work in a 4gl-program.
> The engine is IDS 7.30.UC2-1 and RDS-4GL is 7.20.UD7 on a SCO
> OpenServer 5.0.5.
>
> Example:
> select {+INDEX (tablename indexname)} *
> from tablename
>
> I look the 4gi file of the program with hd utility, and I can see
> the sql statement, but the optimizer directive has disappeared.
>
> Thanks !!
>
>
>
>
--
Octav Chiriac Phone: (373) 2 22 99 67
NetInfo S.R.L. Fax: (373) 2 21 36 59
Chisinau (373) 2 22 84 88
Moldova, Republic of mailto:com@netinfo-moldova.com
Octav Chiriac wrote:
> I suppose the 4GL compiler wipes out the optimizer directives as it
> get them as plain comments. One way to get arround this is to
> make a string with your statement, prepare and execute it.
True; the trick is to remember that if you start the hint with --+, you must
include
a newline in the string (ASCII(10)). Otherwise almost the whole string is
treated
as comment.
> On Mon, Dec 20, 1999 at 08:19:02PM +0100, Jorge Lopez wrote:
> > Hello.
> >
> > I can use optimizer directives from dbaccess / Query Language, but
> > they don´t work in a 4gl-program.
> > The engine is IDS 7.30.UC2-1 and RDS-4GL is 7.20.UD7 on a SCO
> > OpenServer 5.0.5.
> >
> > Example:
> > select {+INDEX (tablename indexname)} *
> > from tablename
> >
> > I look the 4gi file of the program with hd utility, and I can see
> > the sql statement, but the optimizer directive has disappeared.
--
Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net)
Guardian of DBD::Informix v0.62 -- see http://www.perl.com/CPAN
#include <disclaimer.h>