No. What is the purpose of your query? You could use ORDER BY and LIMIT..OFFSET to do what you want. I think.

The problem is probably speed. I have done a lot of tests, and when OFFSET gets to a few thousands on a multimega-recs database, it gets very very slow...


is there not a similar loss of speed using ROWNUM on oracle?


... Is there any other to work around that?


if you are ordering by a unique key, you can use the key value
in a WHERE clause.

select ... where ukey>? order by ukey limit 100 offset 100;

(the ? is placeholder for the last value of ukey returned
from previous select)

I tried that. It does not work in the generic case: 6 MegaRec, telephone listing, alphabetical order. The problem is that somewhere there is a single user with too many entries (over 1000). I even tried to filter the repetitions, but somewhere I get stuck if one guy has too mny entries (one for each phone number).


I tried using both the name and the primary key (with a combined index), to get faster to the record I want, but I was not sucessfull in building a where clause.

I would appreciate any help, in fact this is my primary reason for joining this list ;-)

Alain

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
     joining column's datatypes do not match

Reply via email to