Force index use in Oracle
You can use optimizer hints
select /*+ INDEX(table_name index_name) */ from table
etc...
More on using optimizer hints:
http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/hintsref.htm
How to force oracle to not to use an index
use NO_INDEX hint
http://docs.oracle.com/cd/B19306_01/server.102/b14200/sql_elements006.htm#BABHJBIB
for instance
SELECT /*+ NO_INDEX(t1 id1) */
FROM t1,
t2
WHERE t1.id = t2.id;
Force oracle to use index
No. And if the optimizer doesn't use the index, it usually has a good reason for it. Index usage, if the index is poor, can actually slow your queries down.
Related Topics
How to Add a Column and Make It a Foreign Key in Single MySQL Statement
How to Format Bigint Field into a Date in Postgresql
Best-Performance Query for "Select Max in Group"
Update Only Time in a MySQL Datetime Field
How to Take Sum of Column with Same Id in SQL
Checking for Time Range Overlap, the Watchman Problem [Sql]
What Is the Ms SQL Server Capability Similar to the MySQL Field() Function
Get Excel Sheet into Temp Table Using a Script
How to Do a Simple 'Find and Replace" in Mssql
Psql: Server Closed the Connection Unexepectedly
Differencebetween a Primary Key and a Unique Constraint
Trigger to Prevent Insertion for Duplicate Data of Two Columns
How to Find the Average Time Difference Between Rows in a Table