Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: About indexes
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
![]() |
![]() |