Re: optimization-goal directive
Posted in 1999
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Server Administration
I _*think*_ it's in 4GL 7.3...but I couldn't swear to it...
:)
From: Octav Chiriac <com@netinfo-moldova.com>
>
>Interesting. Does it work when you prepare the statement with
>the optimization directives ?
>
>Octav
>
>On Thu, Aug 26, 1999 at 03:10:32PM +0800, Ralf Peters wrote:
> > running ver 7.3 IDS . 7.20 RDS
> >
> > FIRST_ROWS Syntax works fine under dbaccess , but causes syntax error
>under
> > RDS. Is it just me or does RDS does not like "optimization directives ",
>if
> > so does anybody know if it will in the future.
> >
> > Please tell me it is me .
> >
> > CHEERS
> > Ralf
> >
> >
>
>--
>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
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
Obnoxio The Clown wrote:
> I _*think*_ it's in 4GL 7.3...but I couldn't swear to it...
It's supposed to be in 7.30, so if it isn't there, I'm going to swear
*at* it.
> From: Octav Chiriac <com@netinfo-moldova.com>
> >Interesting. Does it work when you prepare the statement with
> >the optimization directives?
> >
> >On Thu, Aug 26, 1999 at 03:10:32PM +0800, Ralf Peters wrote:
> > > running ver 7.3 IDS . 7.20 RDS
> > >
> > > FIRST_ROWS Syntax works fine under dbaccess, but causes syntax
> > > error under RDS. Is it just me or does RDS does not like
> > > "optimization directives ", if so does anybody know if it will
> > > in the future.
The reason that 7.20 RDS doesn't support optimization directives
is that it doesn't understand any feature of SQL that was not in
4.10. It can be faked into handling preparable statements by using
PREPARE, but it doesn't understand those.
The Mindless Blonde <a_blonde@mindless.com> also asked:
> It appears that PREPARE does not like the ANSI standard comments,
> but DOES like the SQL comments. So instead of using '--', embed
> your directives in '{}' and it will work.
>
>Wierd! Maybe JL can explain this if he is not still mad at me.
JL is still a trifle piqued by some of your mannerisms, and some of
your responses to one of my answers, but will probably get used to
seeing 'dude' scattered around your postings.
As to why PREPARE doesn't recognize -- style comments, I'm curious to
know how you put the newline into the strings to terminate those
comments. At least, that's my starting point for questions. The
normal technique of building a query doesn't work:
LET stmt = "SELECT --+ optimizer hint ",
" * FROM SomeWhere WHERE SomeCondition"
The stmt consists of SELECT and a lot of comment; the comment extends
up to the first newline or the end of string.
--
Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net)
Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN
#include <disclaimer.h>
PS: You would probably improve my attitude towards you if you 'fessed
up to your real name. I don't like dealing anonymously. You can send
the info via email if you don't want the whole group to know who you
are.