manip of clusterratio - HINT

Nick Cianci

manip of clusterratio - HINT
Dare I say it (as it seems to almost be taboo), but if you are worried about
the optimiser ignoring "OR 0=1", in a DB2 upgrade then you could prepare an
optimiser HINT ;-) just in case!

... nudge nudge, wink wink, say no more !

Cheers,
Nick F. Cianci
IBM Certified Solutions Expert
- DB2 UDB V7.1 Database Administration for OS/390

EDS Canberra Solution Centre
DB2 DataBase Administrator
Phone: +61 2) 6275-5863
+61 (0)408-64 06 01

-----Original Message-----
From: Alekos Papadopoulos [mailto:[login to unmask email]
Sent: Tuesday, 14 January 2003 10:13 PM
To: [login to unmask email]
Subject: Re: manip of clusterratio

Daniel,
Thank you for the clarification. I was also worried, since we plan
to migrate to V7 soon.

Actually it is documented that it should work as you said (Admin Guide,
5.8.4.2 Rewriting queries to influence access path selection, Example 2).
Let's see what others (James?) think about it.

Alekos

>-----Original Message-----
>From: Daniel [mailto:[login to unmask email]
>Sent: Tuesday, January 14, 2003 12:36 PM
>To: [login to unmask email]
>Subject: Re: manip of clusterratio
>
>
>Alekos,
>Our package/stmt used specific index with bad distribution. We added 'OR
>0=1' to that predicate, recompiled, relinked and bound the package again.
>DB2 did not use the index anymore.
>Cheers,
>Daniel



Peter Backlund

Re: manip of clusterratio
(in response to Nick Cianci)
The 'or 0=1' construction suppresses the use of the relevant index,
but - it also makes the predicate stage 2.

It is much better to use '+0' or 'concat empty string'

Peter

Alekos Papadopoulos wrote:

>Daniel,
>Thank you for the clarification. I was also worried, since we plan to
>migrate to V7 soon.
>Actually it is documented that it should work as you said (Admin Guide,
>5.8.4.2 Rewriting queries to influence access path selection, Example 2).
>Let's see what others (James?) think about it.
>
>Alekos
>
>
>
>>-----Original Message-----
>>From: Daniel [mailto:[login to unmask email]
>>Sent: Tuesday, January 14, 2003 12:36 PM
>>To: [login to unmask email]
>>Subject: Re: manip of clusterratio
>>
>>
>>Alekos,
>>Our package/stmt used specific index with bad distribution. We added 'OR
>>0=1' to that predicate, recompiled, relinked and bound the package again.
>>DB2 did not use the index anymore.
>>Cheers,
>>Daniel
>>
>>
>
>
>
>**************************************************************************************
>Email Disclaimer
>The information in this email is confidential and is intended solely for the addressee(s). If you have received this transmission in error, and you are not an intended recipient, be aware that any disclosure, copying, distribution or use of this transmission or its contents is prohibited. Furthermore, you are kindly requested to send us back the original message at the address [login to unmask email], and delete the message from your system immediately.
>Internet communications are not secure and therefore the National Bank of Greece Group does not accept legal responsibility for the contents of this message and for any damage whatsoever that is caused by viruses being passed. Any views or opinions presented are solely those of the author and do not necessarily represent those of National Bank of Greece Group.
>Thank You,
>National Bank of Greece Group
>**************************************************************************************
>
>
>
>
>
>

--

=====> See you in October, 2003 at IDUG in Nice, France <======

+-------------------------------+---------------------------------+
| Peter G Backlund | Telephone: 08 - 38 69 08 |
| Peter Backlund DB2-Konsult AB | Mobile: 070 - 764 7554 |
| Smastuguvagen 2 | Country Code (Sweden): 46 |
| S-165 72 HASSELBY | |
| Sweden | E-mail: [login to unmask email] |
+-------------------------------+---------------------------------+
| IBM Database GOLD Consultant |
+-------------------------------+---------------------------------+
| Working with DB2 since 1981 ... and forever! |
+-----------------------------------------------------------------+