[ 
https://issues.apache.org/jira/browse/SOLR-812?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shalin Shekhar Mangar updated SOLR-812:
---------------------------------------

    Attachment: SOLR-812.patch

Changes
# Supports the following through configuration (extra attributes in 
<dataSource> element or solrconfig.xml):
## readOnly
## autoCommit
## transactionIsolation
## holdability
## maxRows
# If readOnly is specified the following are added by default (but they will be 
overridden if specified explicitly):
{code}
setAutoCommit(true);
setTransactionIsolation(Connection.TRANSACTION_READ_UNCOMMITTED);
setHoldability(ResultSet.CLOSE_CURSORS_AT_COMMIT);
{code}
# If 'start' and 'rows' are specified as request parameters, then we call 
setMaxRows(start + rows) automatically overriding value specified in 
configuration
# No changes are made unless configuration is specified, so it is backwards 
compatible.

I'd like to commit this in a day or two. We also need to add this documentation 
to the wiki page.



> JDBC optimizations: setReadOnly, setMaxRows
> -------------------------------------------
>
>                 Key: SOLR-812
>                 URL: https://issues.apache.org/jira/browse/SOLR-812
>             Project: Solr
>          Issue Type: Improvement
>          Components: contrib - DataImportHandler
>    Affects Versions: 1.3
>            Reporter: David Smiley
>         Attachments: SOLR-812.patch
>
>
> I'm looking at the DataImport code as of Solr v1.3 and using it with Postgres 
> and very large data sets and there some improvement suggestions I have.
> 1. call setReadOnly(true) on the connection.  DIH doesn't change the data so 
> this is obvious.
> 2. call setAutoCommit(false) on the connection.   (this is needed by Postgres 
> to ensure that the fetchSize hint actually works)
> 3. call setMaxRows(X) on the statement which is to be used when the 
> dataimport.jsp debugger is only grabbing X rows.  fetchSize is just a hint 
> and alone it isn't sufficient.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to