Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Indexing issue

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
kanha

New User


Joined: 05 Nov 2005
Posts: 28

PostPosted: Mon Jul 25, 2011 1:04 pm    Post subject: Indexing issue
Reply with quote

Explain shows that query1 uses index XTABLE12 but query2 does a TS scan. Can someone explain me why? & how to avoid the TS scan on query2?

Query:1
SELECT count(*)
FROM TABLE1
WHERE UPD_TIMESTAMP > '2011-03-25-09.25.55.415477'


Query:2
SELECT CONTRACT_NBR
FROM TABLE1
WHERE UPD_TIMESTAMP > '2011-03-25-09.25.55.415477'


The first index XPOM4011 is clustered & partitioned. I believe this is having some effect on indexing.

INDEX NAME COLUMN NAME COLSEQ ORD CLS
XTABLE11
CONTRACT_NBR 1 A Y
VNDR_NBR 2 A Y


INDEX NAME COLUMN NAME COLSEQ ORD CL
TABLE12
UPD_TIMESTAMP 1 A N
CONTRACT_STATUS 2 A N
CONTRACT_NBR 3 A N
Back to top
View user's profile Send private message

GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Mon Jul 25, 2011 1:56 pm    Post subject:
Reply with quote

not enough info:
* Partitioning method, keys and ranges
* statistics for indexes,indexparts and column UPD_TIMESTAMP
* contents of PLANTABLE.PAGE_RANGE
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Tape file issue abdulrafi JCL & VSAM 2 Thu Feb 08, 2018 12:01 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts SIGNAL ON HALT issue packerm CLIST & REXX 1 Fri Oct 20, 2017 6:56 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts Execessive parameter issue Sumeendar JCL & VSAM 5 Mon Dec 19, 2016 4:35 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us