Hi,
i was wondering how 
 em.createNamedQuery("MyQuery").setMaxResults(10)
effects the underlying queries produced by JBoss.

I fugured out, that at first the complete query is executed and all entities 
for that query is loaded into the cache and after this the first 10 results are 
picked and returned.
Is this right?

If it it so, how can i afford it that only the first results are selected from 
the database without loading all the other rows? In my case this issue is a 
enormouse perfomnce killer.

I had a look at the annotation
@BatchSize from Hibernate
but this is only for specifying the amount of Statements to select one row.

I'm using JBoss 4.0.3SP1
EJB3.0
Postgres7.4

Thanks for your answers
and merry christmas


martin

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3914166#3914166

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3914166


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to