SQL Performance (MOSC)

MOSC Banner

Optimized use of views??

edited May 23, 2013 12:40AM in SQL Performance (MOSC) 8 commentsAnswered

please consider below two approaches:-

table TEMP_TABLE1  contains data for around 1000 resources.

1st Approach:-

--create view for one resource

Create view TEMP_VIEW_100 as select * from table1 t1, table2 t2 where t2.resource_id = 100 and t1.resource_id = t2.resource_id

then we will use this view to find difference between data returned by this view and data in a table TEMP_TABLE1 with same structure using below query:-

SELECT resource_id, task_number, task_assignment_id, escalation_task_number,

esc_level_name, esc_summary, esc_status, esc_reason, party_name

FROM (SELECT MIN (tablename) AS tablename, resource_id, task_number,

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