SQL Performance (MOSC)

MOSC Banner

Difference between running = or using IN

edited Jun 22, 2015 9:40AM in SQL Performance (MOSC) 10 commentsAnswered

Hi,

The query below runs very good (36 sec) but if I replace the = (green) with the outcommented section (in red) the query runs for over 45 minutes.

Whare are the differences for the CBO when using = instead of IN? Just curious

Regards

S

SELECT

  MDV_TIME_DAY.DAY_DATE,

  MDV_LOC_STOR.STOR_DSPL_NAME,

  MDV_PROD_SKU.STY_DSPL_NAME

FROM

  MDV_TIME_DAY,

  MDV_LOC_STOR,

  MDV_PROD_SKU,

  MFV_SATX_ITM

WHERE

  ( MDV_TIME_DAY.DAY_TIME_KEY=MFV_SATX_ITM.DAY_TIME_KEY  )

  AND  ( MDV_PROD_SKU.SKU_PROD_KEY=MFV_SATX_ITM.SKU_PROD_KEY  )

  AND  ( MDV_LOC_STOR.STOR_LOC_KEY=MFV_SATX_ITM.STOR_LOC_KEY  )

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center