Btw, I removed the batchSize but performance is better with
batchSize=1. I haven't done further testing to see what the best
setting is, but the difference between setting it at 1 and not
setting it is almost double the indexing time (~20 minutes vs ~37
minutes)
On Thu, Jun 14, 2012 at 4:4
Actually, the readOnly=true makes things worse.
What it does (among other things) is:
c.setTransactionIsolation(Connection.TRANSACTION_READ_UNCOMMITTED);
which leads to:
Caused by: org.postgresql.util.PSQLException: Cannot change
transaction isolation level in the middle of a transacti
Try readOnly="true" in the dataSource configuration. This causes several
defaults to get set in the JDBC connection, and often will solve problems like
this. (see
http://wiki.apache.org/solr/DataImportHandler#Configuring_JdbcDataSource)
Also, try a batch size of 0 to let your jdbc driver pick