[DB2-L] RTRIM weirdness

Walter Janißen

[DB2-L] RTRIM weirdness
Because according to OSC it is a stage2-predicate and the function is not removed. Apparently only with LIKE the function is removed. That's strange or a you called it weird.

Mit freundlichen Grüßen
Walter Janißen

ITERGO Informationstechnologie GmbH
Anwendungsentwicklung
Laufzeitarchitektur
Victoriaplatz 2
40477 Düsseldorf
Tel.: +49 211 477-2928
Fax: +49 211 477-2615
mailto:[login to unmask email]

Vorsitzender des Aufsichtsrates: Jürgen Vetter
Geschäftsführung: Dr. Bettina Anders (Vorsitzende),
Ina Kirchhof, Dr. Christian Nymphius, Dr. Michael Regauer, Wolfgang Schön.
Sitz: Düsseldorf, Handelsregister: Amtsgericht Düsseldorf, HRB 37996



________________________________
Von: IDUG DB2-L [mailto:[login to unmask email] Im Auftrag von Roy Boxwell
Gesendet: Montag, 7. Dezember 2009 10:01
An: [login to unmask email]
Betreff: [DB2-L] RTRIM weirdness


ok, I have found out that RTRIM was "optimized" out of the SQL in V6 with PQ53700 so now the only question is why is = doing a TS Scan...



Roy Boxwell
SOFTWARE ENGINEERING GMBH
-Product Development-
Robert-Stolz-Straße 5
40470 Düsseldorf/Germany
Tel. +49 (0)211 96149-675
Fax +49 (0)211 96149-32
Email: [login to unmask email]
http://www.seg.de

Software Engineering GmbH
Amtsgericht Düsseldorf, HRB 37894
Geschäftsführung: Siegfried Fürst, Gerhard Schubert

________________________________

[ http://www.idug.org/images/M_images/idug%20org.jpg ] < http://www.idug.org >

The IDUG DB2-L Listserv is only part of your membership in IDUG. If you are not already an IDUG member, please register here. < http://www.idug.org/register >

_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 * http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.idug.org/db2-videos.html has hundreds of video presentations!
Did you miss out on attending an IDUG conference?
Many of the presentations were recorded and are available on our website!
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's DB2-L

Terry Purcell

Re: AW: [DB2-L] RTRIM weirdness
(in response to Walter Janißen)
I am somewhat of a "glass half full" person - so I would say "Wow, look how
the optimizer rewrites this stage 2 predicate RTRIM(col) LIKE to an
indexable predicate!!".

It's true that this enhancement only extends to LIKE.

I can understand why someone would code the RTRIM with the LIKE,
because then they don't have to worry about the trailing blanks and use
wildcards for the literal/host var side. Not sure why you would use the RTRIM
for the equals.

Regards
Terry Purcell

On Mon, 7 Dec 2009 10:36:06 +0100, Walter Janißen
<[login to unmask email]> wrote:

>Because according to OSC it is a stage2-predicate and the function is not
removed. Apparently only with LIKE the function is removed. That's strange
or a you called it weird.
>
>Mit freundlichen Gr?Walter Janiߥn
>
>ITERGO Informationstechnologie GmbH
>Anwendungsentwicklung
>Laufzeitarchitektur
>Victoriaplatz 2
>40477 D?orf
>Tel.: +49 211 477-2928
>Fax: +49 211 477-2615
>mailto:[login to unmask email]
>
>Vorsitzender des Aufsichtsrates: J?Vetter
>Gesch䦴sf?: Dr. Bettina Anders (Vorsitzende),
>Ina Kirchhof, Dr. Christian Nymphius, Dr. Michael Regauer, Wolfgang Sch?
>Sitz: D?orf, Handelsregister: Amtsgericht D?orf, HRB 37996
>
>
>
>________________________________
>Von: IDUG DB2-L [mailto:[login to unmask email] Im Auftrag von Roy
Boxwell
>Gesendet: Montag, 7. Dezember 2009 10:01
>An: [login to unmask email]
>Betreff: [DB2-L] RTRIM weirdness
>
>
>ok, I have found out that RTRIM was "optimized" out of the SQL in V6 with
PQ53700 so now the only question is why is = doing a TS Scan...
>
>
>
>Roy Boxwell
>SOFTWARE ENGINEERING GMBH
>-Product Development-
>Robert-Stolz-Straߥ 5
>40470 D?orf/Germany
>Tel. +49 (0)211 96149-675
>Fax +49 (0)211 96149-32
>Email: [login to unmask email]
>http://www.seg.de
>
>Software Engineering GmbH
>Amtsgericht D?orf, HRB 37894
>Gesch䦴sf?: Siegfried F?Gerhard Schubert

_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 * http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.idug.org/events/index.html is your DB2 Events calendar! RUG meetings,
Webcasts, Conferences- what is going on next?
RUG leaders- get your events on the calendar today!
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's DB2-L