|
|
Re: SetFirstResult and setMaxResult problem if exist @OneToMany relation [message #1063220 is a reply to message #1063141] |
Wed, 12 June 2013 17:14 |
Marvin Toll Messages: 34 Registered: July 2009 |
Member |
|
|
@Chris... while we are on this topic... our multicore implementation ( http://patternenabled.com/source/html/info/soaj/jpa/rm/SjpPersistenceRM.java.html ) sets the "fetch size" and "max results" to be equivalent to the "count" for the query.
Question: Is setting these values equivalent a recommended practise when we are certain of the result set size?
09 // Check if max results were set.
10 if (0 < namedQueryPO.getMaximumFetchSizePerQuery()) {
11
12 /*
13 * "eclipselink.jdbc.fetch-size" Configures the JDBC fetch-size for
14 * the queries result-set. This can improve the performance for
15 * queries that return large result-sets. Valid values are Integer
16 * or Strings that can be parsed to int values.
17 */
18 query.setHint(QueryHints.JDBC_FETCH_SIZE,
19 namedQueryPO.getMaximumFetchSizePerQueryAsObject());
20
21 // The combination of the two conditional statements
22 // leads one to conclude this is a multicore query.
23 if (0 < namedQueryPO.getMulticoreTaskCount()) {
24
25 query.setMaxResults(namedQueryPO.getMaximumFetchSizePerQuery());
26
27 query.setFirstResult(namedQueryPO.getQueryStartPosition());
28
29 }
30 }
Marvin Toll
CTO, Pattern Enabled Development
http://pedCentral.com
[Updated on: Wed, 12 June 2013 17:14] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03262 seconds