SQL Performance (MOSC)

MOSC Banner

Query doesn't run when function is passed

edited Sep 22, 2014 10:39AM in SQL Performance (MOSC) 3 commentsAnswered

Hi All, we are on 11203 and I don't have access to the DB ( joined recently) yet. I need help in tuning the query below.

The query below doesn't start , and hung forever.

SELECT

src.addressid,

src.countrycode,

src.modifiableind,

src.addressdata,

src.addresslayouttype,

src.geocode,

src.latitude,

src.longitude,

src.versionno,

src.lastwritten,

CASE WHEN tgt.ADDRESSID IS NULL THEN 'I' ELSE 'U' END InsUpdInd

FROM   CURAM_S1_USER.ADDRESS@sit src

LEFT OUTER JOIN ADDRESS tgt

ON tgt.ADDRESSID=src.ADDRESSID

WHERE NVL(src.lastwritten,SYSDATE) > get_ETL_TABLE_LASTWRITTEN('ADDRESS')

The function get_ETL_TABLE_LASTWRITTEN('ADDRESS')  will return the value

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