07-31-2023, 09:35 AM
I have a view and I want to query my view like that to hint some index from a base table,can I do that?
I mean:
--view
create or replace view temp_view
as select col1,col2,col3
from table1,table2....
I have an **index** on **table1.col1** called "**index1**".
I have a **query**:
--query
select *
from temp_view
where col1=12;
And when I see explain plan of this query it shows me that query doesn't use "index1" and I want to indicate it..
So I want it to be,for example:
--query with hint
select /*+ index(temp_view index1)*/*
from temp_view
where col1=12;
Can I indicate hints for views?? (If I don't want to indicate it during creation of this view)
I mean:
--view
create or replace view temp_view
as select col1,col2,col3
from table1,table2....
I have an **index** on **table1.col1** called "**index1**".
I have a **query**:
--query
select *
from temp_view
where col1=12;
And when I see explain plan of this query it shows me that query doesn't use "index1" and I want to indicate it..
So I want it to be,for example:
--query with hint
select /*+ index(temp_view index1)*/*
from temp_view
where col1=12;
Can I indicate hints for views?? (If I don't want to indicate it during creation of this view)