Avoid index usage

Max Scarpa

Avoid index usage
Hi all

Some time ago there was a discussion about all tricks to avoid one index
usage before V8 and that now in V8 don't work any more. I mean 0 =1 and
similar.

I've a query that behaves in different manner in prod (v7) and in test
(v8) as trick 0 = 1 isn't useless. Can anyone point me to DB2-L discussion
about which tricks are now available in V8 to do the same things ?

I'm sure I've some article somewhere but digging in 4 Gb+ of papers isn't
so fast...

Thank you in advance

Max Scarpa



______________________________________________________________________

* IDUG 2009 Rome, Italy * 5-9 October * http://IDUG.ORG/Events *
______________________________________________________________________



IDUG.org was recently updated requiring members to use a new password. You should have gotten an e-mail with the temporary password assigned to your account. Please log in and update your member profile. If you are not already an IDUG.org member, please register at http://www.idug.org/component/juser/register.html

Adam Baldwin

Re: Avoid index usage
(in response to Max Scarpa)
Hi Max.

For starters have you looked at "Rewriting queries to influence access path
selection" in the V8 Admin Guide?

Cheers, Adam


______________________________________________________________________

* IDUG 2009 Rome, Italy * 5-9 October * http://IDUG.ORG/Events *
______________________________________________________________________



IDUG.org was recently updated requiring members to use a new password. You should have gotten an e-mail with the temporary password assigned to your account. Please log in and update your member profile. If you are not already an IDUG.org member, please register at http://www.idug.org/component/juser/register.html

Patrick Steurs

Re: Avoid index usage
(in response to Adam Baldwin)
In v8 use :

+ 0 for numeric fields

or !! '' for char fields ( concat empty string )



Remember : predicates added with "or 0 = 1" will be come stage-2



greetings,



Patrick Steurs



From: DB2 Data Base Discussion List [mailto:[login to unmask email] On
Behalf Of Max Scarpa
Sent: donderdag 15 januari 2009 11:14
To: [login to unmask email]
Subject: [DB2-L] Avoid index usage




Hi all

Some time ago there was a discussion about all tricks to avoid one
index usage before V8 and that now in V8 don't work any more. I mean 0
=1 and similar.

I've a query that behaves in different manner in prod (v7) and in test
(v8) as trick 0 = 1 isn't useless. Can anyone point me to DB2-L
discussion about which tricks are now available in V8 to do the same
things ?

I'm sure I've some article somewhere but digging in 4 Gb+ of papers
isn't so fast...

Thank you in advance

Max Scarpa



________________________________

IDUG 2009 - North America * May 11-15 * Denver, Colorado, USA
< http://idug.org/lsna >

IDUG.org < http://www.idug.org > was recently updated requiring members
to use a new password. You should have gotten an e-mail with the
temporary password assigned to your account. Please log in and update
your member profile. If you are not already an IDUG.org member, please
register here. < http://www.idug.org/component/juser/register.html >




-----------------------------------------
Visit our website! http://www.nbb.be

"DISCLAIMER: The content of this e-mail message should not be
construed as binding on the part of the National Bank of Belgium
(NBB) unless otherwise and previously stated. The opinions
expressed in this message are solely those of the author and do not
necessarily reflect NBB viewpoints, particularly when the content
of this message, or part thereof, is private by nature or does not
fall within the professional scope of its author."


______________________________________________________________________

* IDUG 2009 Rome, Italy * 5-9 October * http://IDUG.ORG/Events *
______________________________________________________________________



IDUG.org was recently updated requiring members to use a new password. You should have gotten an e-mail with the temporary password assigned to your account. Please log in and update your member profile. If you are not already an IDUG.org member, please register at http://www.idug.org/component/juser/register.html

Peter Backlund

Re: Avoid index usage
(in response to Patrick Steurs)
Max,

what about
    charcol = string concat ''
    numcol = value + 0

Both are stage 1 but not indexable

Peter

Max Scarpa wrote:
Hi all

Some time ago  there was a discussion about all tricks to avoid one index usage before V8 and that now in V8 don't work any more. I mean 0 =1 and similar.

I've a query that behaves in different manner in prod (v7) and in test (v8) as trick 0 = 1 isn't useless. Can anyone point me to DB2-L discussion about which tricks are now available in V8 to do the same things ?

I'm sure I've some article somewhere but digging in 4 Gb+ of papers isn't so fast...

Thank you in advance

Max Scarpa



IDUG 2009 - North America * May 11-15 * Denver, Colorado, USA

IDUG.org was recently updated requiring members to use a new password. You should have gotten an e-mail with the temporary password assigned to your account. Please log in and update your member profile. If you are not already an IDUG.org member, please register here.


No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.176 / Virus Database: 270.10.7/1895 - Release Date: 2009-01-15 07:46
-- Attend IDUG 2009, North America -- 11-15 May in Denver, Colorado Attend IDUG 2009, Europe -- 5- 9 October in Rome, Italy Learn more at http://www.idug.org +-------------------------------+---------------------------------+ | Peter G Backlund | Telephone: 08 - 38 69 08 | | Peter Backlund DB2-Konsult AB | Mobile: 070 - 764 7554 | | Rasundavagen 94 | Country Code (Sweden): 46 | | S-169 57 SOLNA | Skype: BacklundDB2 | | Sweden | E-mail: [login to unmask email] | +-------------------------------+---------------------------------+ | IBM Database GOLD Consultant | +-------------------------------+---------------------------------+ | Working with DB2 since 1981 ... and forever! | +-----------------------------------------------------------------+

IDUG 2009 - North America * May 11-15 * Denver, Colorado, USA

IDUG.org was recently updated requiring members to use a new password. You should have gotten an e-mail with the temporary password assigned to your account. Please log in and update your member profile. If you are not already an IDUG.org member, please register here.