Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Table Partition - response (2) by M.Saeed Khurram

$
0
0

Hi,
 
There are some points to notice about your query:
The first thing is you have a defined PI on (PLCY_NBR, MPD_ID) but you are using a partial value in your where clause using only MOD_ID. So when ever there is a partial index search, the optimizer will not be able to use PI. 
 
The second thing is you are using IN condition with two values, and it ("(INFORM_USER.TABLEA.MO_ID =
201202) OR (INFORM_USER.TABLEA.MO_ID = 201201)"), whenever there is a OR condition in a where clause it might lead to Full table scan.
So to avoid FTS, you can introduce SI on the columns being used in the where condition. define a USI, or NUSI on top of MOD_ID, and collect stats, hope it will help to avoid full table scan.
 
 


Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>