Alex Rivera | Logout

Oracle - How to obtain information on index fields etc

Asked 2011-03-23T17:58:15.413
19

How can I list indexes columns readily defined in Oracle?

And how do I use those indexes in a select statement? Something like:

SELECT x, y, z FROM a WITH INDEX(x)...
Edit
Report

1 Answer

26

How can I list indexes columns readily defined in Oracle

SELECT *
FROM all_ind_columns
WHERE table_name = 'YOUR_TABLE'

http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_1064.htm#i1577532

How do I use those indexes in a select statement

You don't have to do anything. If the index will speed up the query, Oracle will use it automatically.

answered 2011-03-23T18:11:12.163

Your Answer