Content about Java ERP Solution for Reviews Best ERP Software for sale and Free Software with Java OpenSource for Free Download

Oracle Index and tip for using HINT

We can using Index to tunup performance in database
and for more performance in Oracle we can use HINT for select index when query witch example below
Example to create index  
field_a   create index name indx_a
field_b   create index name indx_b
When Query data
select * from my_table where field_a='xxx';  
select * from my_table where field_b='xxx';
The result is good time response ... very fast yes
But when using this query
select * from my_table where field_a='xxx' and field_b='yyy';
Can see it's response is not good ... slowly
crying
I was very confused that why it's not good when we were both of index field in ?
How ever i try to tune up index whtch below it's ok good response and very fast


create index indx_ab on my_table (field_a,field_b)

But i not think so why ? no need to create more index . cool
I try to research and fron the HINT we can using HINT to select INdex for example below

select   /*+INDEX(mt,indx_a)*/ * from my_table mt where field_a='xxx' and field_b='yyy';

It's to fast when query witch no need to create additional index .
laugh