cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Schröder <>
Subject performing count
Date Fri, 01 Jun 2007 14:06:15 GMT

i am wondering about the perfomance-impact of using cayenne to performing an result-count.

currently i am doing something like this, wich is very straight-forward.

		SelectQuery query = new SelectQuery(Tcomrecherche.class, qualifier);
		List list = context.performQuery(query);
		return list.size();

i could also use an SQLTemplate or a named query to perform a COUNT(*) which would be much
uglier. i would prefer the first solution, but i think that this operation will take much
more work for mysql-db than the direct query.

are there some hints on how to handle this?

kind regards,

View raw message