-
most efficient query
How to rewrite this request the most efiiciently
select table_name, owner ,index_name
from dba_indexes
where table_name not like '%_TOI%'
and table_name not like '%_WRK%'
and table_name not like '%_JOB%'
and table_name not like '%_WK%'
and table_name not loke '%_TRA%'
and table_name not like '%_GOR%'
yt
-
Negative logic causes multiple result sets and merges.
It would work faster if you knew what the table_name was like.
select table_name, owner ,index_name
from dba_indexes
where table_name like '%_SOT%'
You could also store the vaules in another table and add a field to act as a flag that you can query by.
select table_name, owner ,index_name
from my_dba_indexes
where is_eom_index_name = 'Y'
-
thanx for your reply
so if I understand, with negative logic 'not like clause' we can nothing do to make the request faster.
I don't know what my table_name look like, but only what they
don't look like, that's why i can only use negative logic.
I will try your second solution.
yt
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|