We are very close to a release of our software but we've hit a performance problem in our approach to displaying a list of records. We are fetching a list of courses and for each one showing the count of enrolments. To do that, we are performing a second stored query to do a count which is proving to be too slow since it requires a second trip back to the database for each row.

Is there a way to do this by creating runtime virtual entity which represents a database view including that count column? Or for that matter any other approach to this speed problem? Doing this as a raw SQL fetch would obviously be quite quick since we could do this in one SELECT statement including the embedded COUNT, but we'd rather a Cayenne friendly option.


Ari Maniatis





-------------------------->
ish
http://www.ish.com.au
Level 1, 30 Wilson Street Newtown 2042 Australia
phone +61 2 9550 5001   fax +61 2 9550 4001
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A


Attachment: PGP.sig
Description: This is a digitally signed message part

Reply via email to