Hello everyone,
Working on improving performance of our decision center, one of the bottlenecks we identify is the DB.
So I wonder, does oracle compiles an Execution Plan for it's views?
Lets hypothetically assume I have a defined query being used 10000
times during a request.
The query looks something like :
select A, B, C
from aTbl, bTbl left join cTbl on bTbl.cTblID = cTbl.objectkey
where aTbl.objectkey = bTbl.parentkey
In the code I would like to fetch the result of the query above with additional filtering parameter, for example: WHERE aTbl.flag1 = <<NUMBER>>
Now I have 2 options:
- Creating a prepared statement using the above
SQL
, then reusing the object. - Putting the above
select (aTbl, bTbl, cTbl)
into aVIEW
, then creating a prepared statement on this view, thus benefiting the from execution plan precompiled b Oracle.
What would you suggest?