what's the default size of hibernate.jdbc.fetch_size? -


By default we know, the size of most jdbc drivers to fetch is 10.

Does anyone know the size of the default hibernate, namely hibernate.jdbc.fetch_size?

itemprop = "text">

Actually, use all configuration settings for an ohcSettings example goes. This is done by ohcSettingsFactory # buildSettings () method that is included in the following lines:

  Integer statementFetchSize = PropertiesHelper.getInteger (Environment.STATEMENT_FETCH_SIZE, Properties) ; If (statementFetchSize! = Null) log.info ("JDBC result set fetch size:" + FetchSize statement); Settings.setJdbcFetchSize (statementFetchSize);  

Then, a zero value is allowed, it will not be translated and will be "publicized".

This setting is used in ohjAbstractBatcher.java # setStatementFetchSize :

  throws private set of setStatementFetchSize (PreparedStatement statement) SQLException {integer statementFetchSize = Factory.getSettings () getJdbcFetchSize (). ; If (statementFetchSize! = Null) {statement.setFetchSize (statementFetchSize.intValue ()); }}  

This personal method is called when forming the created state or callable location . See readyQueryStatement and in the codeable syntiastament in Sargacquer .

Therefore, the default value is null and the result in the hibernate is not called Statement # setFetchSize ()

This is actually reference documentation Is summarized in

3.4. Optional configuration properties

...

hibernate.jdbc.fetch_size : A non-zero value determines the JDBC fetch size (call statement. SetFetchSize () )

And here's what Jawdoc has to say about:

The JDBC driver returns a According to the number of lines that requires more rows for the ResultSet object that is generated by this statement, received them from the database should go. If the specified value is zero, then the signal is ignored. default value is zero .

In other words, when someone uses null fetch_size , the JDBC driver will use the default value that is Zero .


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -