If you use a PreparedStatement is there any difference (for a varchar column) in setting
null or
"" (empty
string) as parameter value? Because our batch insert takes twice as long when using null values (instead of empty strings) as parameter values.
I'm not sure if it's a real
JDBC issue, so I give some information about our environment. Our database is a
Microsoft SQL Server 2008 R2, the JDBC driver we use is the
Microsoft JDBC4 Driver for SQL Server driver. Our standalone application is Spring-enabled: to connect to the database we use a DriverManagerDataSource and to perform the batch inserts we use a
BatchSqlUpdate instance.
Any ideas?