Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Views vs joins

SatyakunalAug 15 2013 — edited Aug 16 2013

Hi,

It may be a very basic question, but exploring blogs got me that there will not be much performance improvement if query is not used heavily.

But what if query is used heavily.

I have a query that is executing for several thousands of time(it is in loop).

This query uses join to 4 heavily populated table(with record count > 30 millions in each table [There is no mechanism to purge old data ] )

This query is taking consuming more time [though query is tuned and is using bind variables]. Basic level DBA investigation are already performed like gathering statistics, De-fragmenting, etc.

Sample Query :

SELECT   table1.col1, table2.col2

   FROM    table1,

                  table2,

                  table3,

                  table4

WHERE   cond1

AND          cond2

AND          cond3

AND          cond4

AND          cond5

ORDER BY table3.col1

Will creating a view be useful for above query and querying on that view be help to improve performance issue...?

CREATE OR REPLACE VIEW SOME_VIEW

AS

SELECT   table1.col1, table2.col2

   FROM    table1,

                  table2,

                  table3,

                  table4

Kindly guide/suggest.

This post has been answered by Nikolay Savvinov on Aug 15 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 13 2013
Added on Aug 15 2013
10 comments
1,026 views