Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: case-insensitive sort
I don't think that necessitates a full table scan. It is an order by which
is performed AFTER the result is selected. Try it where you get 1 row back
and do the order by. I would be very surprised if it did a full table scan.
eg
select * from emp where emp_no=3 order by upper(last_name)
(assuming emp_no is the primary key and last_name is a column in the table)
Jim
-- Replace part of the email address: kennedy-down_with_spammers_at_attbi.com with family. Remove the negative part, keep the minus sign. You can figure it out. "andrewst" <member14183_at_dbforums.com> wrote in message news:2381014.1042466888_at_dbforums.com...Received on Mon Jan 13 2003 - 10:04:20 CST
>
> Originally posted by Andrey Voronov
> > How I can implement case-insensitive sort without use function-based
> > index?
> I guess your options are:
>
> 1) ORDER BY UPPER(colname)
> and have a full table scan
>
> 2) Create another column UPPER_COLNAME and a BEFORE INSERT/UPDATE
> trigger that sets :NEW.upper_colname = :NEW.colname;
> create an index on UPPER_COLNAME;
> then ORDER BY upper_colname
>
> --
> Posted via http://dbforums.com