Hello all. I have a query in Oracle that I'm not sure exactly how to create the index. Here is the query:
Select a.field1
from table1 a, table2 b
where a.field2 = b.field2 and
b.field3 = 37
I assume I should place an index on a.field2. But, what would the indexes be on tableb? I figure it's either
1) 2 separate indexes: b.field2 and b.field3 or
2) 1 index: b.field2, bfield3
Also, is there are more efficient way to write this simple query? I know in SQL Server 7.0, I would use the join statement. What do you think?
Thanks for your help.
Steve
Select a.field1
from table1 a, table2 b
where a.field2 = b.field2 and
b.field3 = 37
I assume I should place an index on a.field2. But, what would the indexes be on tableb? I figure it's either
1) 2 separate indexes: b.field2 and b.field3 or
2) 1 index: b.field2, bfield3
Also, is there are more efficient way to write this simple query? I know in SQL Server 7.0, I would use the join statement. What do you think?
Thanks for your help.
Steve