Home » SQL & PL/SQL » SQL & PL/SQL » Index not used when querying views (oracle 11g)
Index not used when querying views [message #624058] Wed, 17 September 2014 08:18 Go to next message
elaiyavel
Messages: 114
Registered: April 2008
Senior Member
Hi,

When i access the base tables thorugh views, indexes are not used. Pls find script below.

select sch_id from schedule_v where sch_id=100;

Script for schedule_v (View):
select sch_id, (cols list) from schedule_details_view;

Script for schedule_details_view(View):
select sch_id, (cols list) from schedule_details a, schedule_master b
where a.sch_id=b.sch_id;

We have a index on sch_id.

Thanks,
Elaiyavel
Re: Index not used when querying views [message #624059 is a reply to message #624058] Wed, 17 September 2014 08:23 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member

WHY MY INDEX IS NOT BEING USED
http://communities.bmc.com/communities/docs/DOC-10031

http://searchoracle.techtarget.com/tip/Why-isn-t-my-index-getting-used

http://www.orafaq.com/tuningguide/not%20using%20index.html
Re: Index not used when querying views [message #624064 is a reply to message #624058] Wed, 17 September 2014 08:43 Go to previous message
Lalit Kumar B
Messages: 3174
Registered: May 2013
Location: World Wide on the Web
Senior Member
Why do you ask a technical question in such casual fashion? How would anybody suggest anything without knowing the details. Post the execution plan, format it properly and always mention the db version up to 4 decimals.
Previous Topic: need database trigger
Next Topic: find value in table (don't know column name yet)
Goto Forum:
  


Current Time: Thu Apr 25 07:03:32 CDT 2024