On 25/08/09 6:23 PM, Null kühl wrote:
yes, but imagine if it's a huge table, performance wise, ill be reading the
whole table from the db, all columns and all rows.then throw away all the
data except for a certain column, would it have a vast effect on performance
if i just constrain the reading from the beginning ?

It will depend on what you are doing. But I think you should explore 'paging' 
in Cayenne before your current approach. Only once you find you actually have 
performance problems should you go down this path. You will no longer be able 
to deal with clients as a list of Client objects which means no validation, 
saving data back to the db, and much more which Cayenne gives you.

It is a common mistake of people new to ORMs to still think in terms of SQL and 
reading columns. Perhaps in your case this is necessary to get the speed you 
want, but often it is a premature optimisation which precludes a lot of useful 
functionality.


Ari Maniatis


-------------------------->
Aristedes Maniatis
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A

Reply via email to