Cardinality on pipeline function

  • From: Sidney Chen <huanshengchen@xxxxxxxxx>
  • To: "oracle-l@xxxxxxxxxxxxx" <oracle-l@xxxxxxxxxxxxx>
  • Date: Wed, 30 Oct 2013 10:56:34 +0800

Hi list,
Anyway to make optimizer aware of the actual rows from the pipelined
function, something like dynamic sampling? For below sql, I need to add
cardinality hint to specify the approx rows from the TABLE operation, the
default cardinality on pipeline function seems 8168 and usually does not
match the actual rows.

        SELECT /*+ cardinality(t1 1)*/COUNT(1)
          INTO V_COUNT
          FROM TABLE(GET_TABLE_FUNC(:v0)) t1,
               t2
         WHERE t1.id = t2.id
           AND t2.BATCH_ID = :v1;



-- 
Regards
Sidney Chen


--
//www.freelists.org/webpage/oracle-l


Other related posts: