Re: read backwards?
Date: 1995/08/02
Message-ID: <1995Aug2.092234.2226_at_figmnt.tayloru.edu>#1/1
rdugaue_at_web1.calweb.com (Robert Du Gaue) writes:
> We have a database with appoximately 500,000 rows. One query allows users
> to bring up a list of names so that they can narrow down to a specific
> data record. When the list is up, we want them to have the ability to
> page forward and backward. The forward works fine, however the backward query
> using a 'where name < first_displayed_name' type of query goes back to
> the begining of the table and basically reads 1,000s of rows.
>
> Is there a way to read backwards from a certian point and return say the
> next 25 names before a specific key and not have ORacle start from the
> begining of the table?
I believe that this is a classical problem with a database which does not use chaining (ie. pointers from row-to-row). Presumably, relational DBMSes don't have any such pointers other than indexes. Maybe there is some way to make Oracle keep its position in the index and traverse it backwards for a few entries. But then again, maybe Oracle will give us a good tablespace defragmenter some decade :)
- Doug (DBA) Anderson