[
https://issues.apache.org/jira/browse/JENA-28?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12989820#comment-12989820
]
Damian Steer commented on JENA-28:
----------------------------------
Sorry for not following up sooner.
Yes, a full DROP on commit is a problem. The loaders are set up so that the
temporary table exists for the duration of the loader. I can think of a few
solutions, however it's complicated by the fact that it is possible to manually
control transactions. IIRC it's also quite hard to detect the existence of
temporary tables cross-database (ah, standards...), but maybe postgres is ok?
That speed up is well worth having, however.
(Note that for large loads the loader will flush and commit at (iirc) 5000
triples -- chunkSize -- hence the problem)
> Drop Temporary Tables in Postgres (PATCH)
> -----------------------------------------
>
> Key: JENA-28
> URL: https://issues.apache.org/jira/browse/JENA-28
> Project: Jena
> Issue Type: Improvement
> Components: SDB
> Environment: Effects SDB PostgreSQL
> Reporter: Gavin Carothers
> Assignee: Damian Steer
>
> Current behaviour to truncate the temporary tables leaves the table objects,
> and thanks to MVCC in Postgres the data in those tables around for far longer
> then expected. This causes HUGE write loads on the database when loading a
> large number of quads or triples transactionally.
> Fix is VERY simple:
> Index: src/com/hp/hpl/jena/sdb/layout2/hash/TupleLoaderHashPGSQL.java
> ===================================================================
> --- src/com/hp/hpl/jena/sdb/layout2/hash/TupleLoaderHashPGSQL.java
> (revision 8420)
> +++ src/com/hp/hpl/jena/sdb/layout2/hash/TupleLoaderHashPGSQL.java
> (working copy)
> @@ -26,7 +26,7 @@
> }
>
> public String[] getCreateTempTable() {
> - return new String[] { "CREATE TEMPORARY TABLE" , "ON COMMIT
> DELETE ROWS" };
> + return new String[] { "CREATE TEMPORARY TABLE" , "ON COMMIT
> DROP" };
> }
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira