Re: need enhance feature for CBO :)

  • From: William Robertson <william@xxxxxxxxxxxxxxxxxxxx>
  • To: 'Oracle Discussion List' <oracle-l@xxxxxxxxxxxxx>
  • Date: Thu, 13 Nov 2008 07:54:15 +0000

I think Ujang's idea (correct me if I'm wrong) was that you could get the distinct key values from the partition definitions stored in the dictionary. However that information is not guaranteed to be accurate as you might have empty partitions, or you might have previously used ALTER TABLE EXCHANGE PARTITION WITHOUT VALIDATION.



-----Original message-----
From: Mark W. Farnham
Date: 12/11/08 16:49

Jared asks an interesting question, but I'm even more interested in why you think

"I think scanning Primary key
 more efficient rather than roundtrip read PVC_U1 index and then again
 read PVC_PK index, due to IOT mapping..." ?

Your query only needs the seq column. All the column seq values are in pvc_u1, which is smaller than the PK.

So of course the CBO uses the smaller index. Since both SEQ and ES are in the PK, I can absolutely guarantee that pvc_u1 is smaller than the PK, which contains them and additional columns.


Other related posts: