Database Tuning (MOSC)

MOSC Banner

Performance with sql query

Hi Experts,

Can you please help in reducing the runtime for the below query. This sql is never ending.

Attached all the statistics required.

SELECT invs.invoice_id,wi.item_key,           
wi.root_activity, wi.root_activity_version,           
wi.owner_role, wi.parent_item_type,           
wi.parent_item_key,wi.parent_context,           
wi.begin_date, wi.end_date,           wi.user_key,           
wi.ha_migration_flag, wi.security_group_id    FROM ( SELECT /*+ qb_name(iview) */ 3371328 invoice_id FROM dual ) 
invs, wf_items wi,  wf_item_attribute_values wiav    
WHERE wi.item_type = 'APINVAPR'    AND   wi.end_date is null    AND   
wi.item_type = wiav.item_type    AND   wi.item_key = wiav.item_key    
AND   wiav.name = 'INVOICE_ID'    AND   wiav.number_value = 
invs.invoice_id    AND  NOT EXISTS (SELECT 1 FROM wf_item_attribute_values  wiav2  WHERE wiav2.item_type = 
'APINVAPR'             AND   wiav2.item_key  = wi.item_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