Subject Re: [firebird-support] Badly need your Help-Very urgent
Author Daniel Albuschat
2006/7/25, Graeme Edwards <g.edwards@...>:
> My guess would be more along the lines of
> Select * from user left outer join userproperties on . where user.userid in
> (Select first 21 skip 19 userID from User)

Ah, now I see what he means.
Hm that's indeed not a simple problem. I think you can gain the fastest
results when you write a stored procedure that selects the wanted
rows from user and then join this stored proc to userproperties.

set term ^;
create procedure select_users(i_first integer, i_skip)returns(userid
integer, username varchar(10) /* or whatever */) as
for select first :i_first skip :i_skip userid, username from user
into :userid, :username do

select * from select_users(21,19) u left join userproperties p .....

The code is untested, it's not guaranteed to work. But you should get
what I mean.
I don't know whether it's ok to give the argiments to first and skip
as parameters....
probably it's not.

Daniel Albuschat

eat(this); // delicious suicide