Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Index question
Hi,
There are a couple of tables to help you out...
user_indexes (or all_indexes) will show you the indexes and their
associated tables.
user_ind_columns (or all_ind_columns) will show the columns contained
within the index (multiple rows per index potentially).
In your example, an index on the item column is the only thing which will help.
Try:
create index ind_itemloc_item on itemloc(item);
Then issue:
analyze table itemloc estimate statistics;
Look at the manuals for additional info on the above statements - you might want to add a tablespace clause to the "create index" statement for example. The analyze command will provide Oracle with information about the index so that it knows when to use or not use the index.
Finally, is the itemloc column a number or string column. If it's a number column then don't wrap quotes around the supplied number - the implicit datatype conversion can cause Oracle to ignore the index.
Regards,
Mark.
"Teresita Castro" <[EMAIL PROTECTED] To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]> martmx.com> cc: Sent by: Subject: Index question [EMAIL PROTECTED] om 25/06/2003 09:44 Please respond to ORACLE-L
Hi!
I am new using Oracle, and what to ask some doubt about indexes
How can I see how many fields of a table have indexes?
I am trying to do an update but is too slow, so what I am trying to find is the way to uses an index that can help to do this update more quickly. This is the query example:
Update ITEMLOC
SET AVERAGE_COST=5.5
WHERE ITEM='0010096'
I will like to find the way to set and index that have the item filed
include to do this update quicker. Right now it takes like 30 seconds per
item and we have to update like 9,000 items.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<---->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Privileged/Confidential information may be contained in this message.
If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply e-mail or by telephone on (61 3) 9612-6999. Please advise immediately if you or your employer does not consent to Internet e-mail for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of Transurban City Link Ltd shall be understood as neither given nor endorsed by it. <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<---->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Mark Richard INET: [EMAIL PROTECTED] Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Tue Jun 24 2003 - 18:38:39 CDT