All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.akquinet.jbosscc.guttenbase.tools.NumberOfRowsPerBatch Maven / Gradle / Ivy

There is a newer version: 2.1.0
Show newest version
package de.akquinet.jbosscc.guttenbase.tools;

import java.sql.PreparedStatement;

import de.akquinet.jbosscc.guttenbase.meta.TableMetaData;

/**
 * How many rows will be inserted in single transaction? This is an important performance issue.
 * 
 * We support two ways to insert multiple rows in one batch: Either with the {@link PreparedStatement#addBatch()} method or with multiple
 * VALUES() clauses for an INSERT statement. The latter method is much faster in most cases, but not all databases support this, so the
 * value must be 1 then.
 * 
 * The value also must not be too high so data buffers are not exceeded, especially when the table contains BLOBs.
 * 
 * 

* © 2012-2020 akquinet tech@spree *

* * @see MaxNumberOfDataItems * @author M. Dahm */ public interface NumberOfRowsPerBatch { int getNumberOfRowsPerBatch(TableMetaData targetTableMetaData); /** * Use VALUES() clauses or {@link PreparedStatement#addBatch()} as discussed above */ boolean useMultipleValuesClauses(TableMetaData targetTableMetaData); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy