Index not used when querying views [message #624058] |
Wed, 17 September 2014 08:18 |
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 #624064 is a reply to message #624058] |
Wed, 17 September 2014 08:43 |
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.
|
|
|