Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Descending Indexes
Ritu <ritub_at_teri.res.in> writes:
> I have struggled so much but couldn't find a way to create desceding
> indexes using Oracle8 and Delphi4. My problem is that I want to display
> dates in descending order and also at the same time give the facility to
> update them so cannot use queries and views don't allow order by clause.
Hm, a possibility just occurred to me, I don't know if it will work:
create view backwards as (
select /*+ index_desc(tbl,idx) */ * from tbl
)
Should ask Oracle to do a descending index scan on table "tbl". If Delphi isn't putting an ORDER BY clause on the query at all then this might work. A hint will not force Oracle to do something that doesn't satisfy the query though so if Delphi is putting an ORDER BY clause on the query it would force Oracle to ignore the hint in the view. Hints in views seem to be particularly unreliable in general however, probably something to do with the optimizer merging views, so I don't know if this will always work anyways.
--
greg
Received on Sun Feb 06 2000 - 23:53:20 CST
![]() |
![]() |