paginate within the finder....
I have posted it already, but here goes nothing (again)
tampag = Size of each page
numpag = Page number
table = you'd better know...
SELECT TOP :tampag * FROM table WHERE NOT IN (SELECT TOP :tampag*numpage *
FROM table)
It's as portable as it gets... but I'm always open to suggestions
HTH
Rifle
-----Original Message-----
From: Ken Burcham [mailto:[EMAIL PROTECTED]]
Sent: Jueves, 28 de Septiembre de 2000 14:46
To: [EMAIL PROTECTED]
Subject: references, collections and efficiency
Hiya!
Hope you're all smiley today. :)
If my finder on my cmp ejb returns a reference to a collection to my
servlet, and I stuff that reference into the session, will each ejb in the
collection just be hanging around until I drop the reference to the
collection? I'm wondering because I'd like to do something like that to
improve performance for doing a getNext/getPrevious kind of thing as you
move up and down a list. Seems like it'd be anti-productive to go and get
the list everytime, find the one you were just on and then go prev/next from
there. So I'm thinking of storing the collection in the session between
uses to save the trip to the db.
So I guess I'm assuming that findAll's are expensive, and it is better to
keep several hundred cmp's around in a collection than to hit the db again
and repopulate the construct.
Good/bad thinking? better ideas?
Thanks!
ken.
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".