index for OR operator with different columns What would be best index for this kind of query:

-- id is the PK
create table test3(id number,name varchar2(30) not null,lastname varchar2(30) not null);

select id from test3 where id=:1 and (name=:2 or lastname=:3);


Would that be depends on the number of distinct values of each column(in that case the index would be on the more distinct column)?
What if we cant tell what is the nature of the data..?
If id is the primary key, any query with where id=:1 and (..whatever..) can effectively use the primary key index and retrieve, lookup only one row (if there is one.) It will then have to do the additional checks, the (..whatever..) but that is not going to be slow, since it's only one row.

If id was not the primary key, the situation might be different, depending on the selectivity of the 3 columns involved. The best index, would probably be two indexes, on (name, id) and on (lastname, id)

Oracle's optimizer can then use both indexes, doing an "index join". See the SQL-Fiddle.