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!

Unable to execute the query having indirect relationship among all eight tables

User_4BPYGJan 18 2015 — edited Jan 19 2015

I have a requirement in which there are eight tables views to select data from as per given query, as per my knowledge, we can not create indexes over views (can be done on the base tables), is there an alternative to improve the performance of below given query which time outs otherwise (due to nature of query, which creates cartesan product of records).

Need to select a single field from A and another single field from H which are related as given below:

                      ![mapping.png](https://objectstorage.us-phoenix-1.oraclecloud.com/p/BqK85Rn1zA5MP0vYiqbAdPgs7Z6OmMxw8SD3WCFVm5kY8uReidZ1KPIKkgJ1hCkG/n/axciphqpnohg/b/forums-legacy/o/uploads/jive_attachments/8/4/5/8457154egami.png)

Here, C has B and B has A reference, Also, C has D reference, D has E, E has F, F has G and Finally G has H reference.

Therefore, based on this indirect relationship the query we have created is:

select a.serviceCode, h.networkAffiliation from A a, B b, C c, D d, E e, F f, G g, H h

where

a.guid=b.externalSystemCodes and

b.guid=c.identityCode and

c.product=d.guid and

d.productChannelLineupGroups=e.guid and

e.channelLineups=f.guid and

f.station=g.guid and

g.electronicProgramGuide=h.guid

Can anyone please suggest?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 16 2015
Added on Jan 18 2015
1 comment
227 views