Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: About indexes

Re: About indexes

From: DA Morgan <damorgan_at_psoug.org>
Date: Mon, 17 Oct 2005 17:48:40 -0700
Message-ID: <1129596516.688784@yasure>


daniellopez21 wrote:
> Hello,
>
> I have a table with 3.000.000 rows. The column 'A', have 2 posssible
> values: RE or FI.
>
> The value RE is in 2.950.000 rows, and the value FI is in 50.000 rows.
>
> i want execute : DELETE FROM my_table WHERE my_column = 'FI'.
>
>
> żż I should create index in my_column ??? Bitmap index??
>
>
> I'm sorry, but my english is disastrous.
>
> Thanks ĦĦ

The appropriate index to create in this situation is a Function Based Index. Clearly the 2.950.000 rows is more than 20% and no matter what you do will generate a full table scan. But an index of only the FI rows would be of value. Here's the DDL

CREATE INDEX fbi_my_table
ON my_table (DECODE(col_A, 'FI', 'FI', NULL));

And what is wrong with your English? ;-)

-- 
Daniel A. Morgan
http://www.psoug.org
damorgan_at_x.washington.edu
(replace x with u to respond)
Received on Mon Oct 17 2005 - 19:48:40 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US