>>> select * from my_table where row_num >= 50000 and row_num < 100000
>>> and myfunc(foo, bar);
>>
>>You just create an index on myfunc(foo, bar)
>
> only if myfunc(foo, bar) is immutable...
And if it's not then the best any database can do is to index scan
row_num - so still you have no problem.
Chris