-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fetch size optimization can be applied by `ListingConfig.ORG_HIBERNAT… #15
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -177,6 +177,19 @@ public class ListingConfig { | |
public static String TIME_ZONE = "UTC"; | ||
public static ZoneId ZONE_ID = ZoneId.of(TIME_ZONE); | ||
|
||
/** | ||
* <code>org.hibernate.fetchSize</code> tells the JDBC driver how many rows to return in one chunk, for large queries.<br> | ||
* If this is set to <code>0</code> (default) it will not be applied. <br> | ||
* <br> | ||
* <i><code>org.hibernate.fetchSize</code> will do nothing if your driver does not support it!</i> <br> | ||
* <br> | ||
* Say you want 1000 rows. If you set the fetch size to 100, the database will return 100, then another 100 when you want more, and so on. <br> | ||
* <br> | ||
* You can also set this globally by adding <code><property name="hibernate.jdbc.fetch_size" value="100"/> </code> to your options in | ||
* <code>persitence.xml</code> | ||
*/ | ||
public static int ORG_HIBERNATE_FETCHSIZE = 0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ich glaub ich würde hier das Ding einfach nur FETCHSIZE nennen, den unter umständen wechselt die Implementierung drunter. Zum Beispiel via Eclipselink... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hatte ich auch gedacht, aber wieder vergessen |
||
|
||
/** | ||
* Name of the (optional) listing property file | ||
*/ | ||
|
@@ -231,6 +244,7 @@ private static void loadProperties() { | |
URI_DECODE = loadProperty(URI_DECODE, "coodoo.listing.uri.decode"); | ||
URI_CHARACTER_ENCODING = loadProperty(URI_CHARACTER_ENCODING, "coodoo.listing.uricharacterencoding"); | ||
|
||
ORG_HIBERNATE_FETCHSIZE = loadProperty(ORG_HIBERNATE_FETCHSIZE, "coodoo.listing.org.hibernate.fetchSize"); | ||
} | ||
} catch (IOException e) { | ||
log.info("Couldn't read {}!", listingPropertiesFilename, e); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete me...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
der pull reqeust geht ja nur in den 1.6.0-SNAPSHOT branch, da fehlt noch doku...