Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 1278
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 Execessive parameter issue Sumeendar JCL & VSAM 5 Mon Dec 19, 2016 4:35 pm
No new posts DFHRESPONSE returns issue divated CICS 3 Wed Nov 02, 2016 6:32 pm
No new posts Can sending 5 MB data between cobol p... Kevin Vaz CICS 12 Tue Oct 18, 2016 4:50 pm
No new posts REXX Screen not working due to LINKED... sundarkudos CLIST & REXX 1 Mon May 09, 2016 1:44 pm
No new posts Issue in sending zip file as mail att... ajithajt JCL & VSAM 8 Thu Apr 07, 2016 9:11 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us