sqoop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Bush (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SQOOP-387) Use TRUNCATE for PostgreSQLManager
Date Tue, 20 Aug 2013 18:26:52 GMT

    [ https://issues.apache.org/jira/browse/SQOOP-387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13745239#comment-13745239

Michael Bush commented on SQOOP-387:

The same applied to Oracle.  In SqlManager.java - deleteAllRecords should be changed from

String deleteQuery = "DELETE FROM " + tableName;


String deleteQuery = "TRUNCATE TABLE " + tableName;

However, for Oracle, TRUNCATE is only available if you have elevated database privileges or
are the schema owner for the table.  So try the truncate first and if there are no privileges
to truncate, then just use the delete.
> Use TRUNCATE for PostgreSQLManager
> ----------------------------------
>                 Key: SQOOP-387
>                 URL: https://issues.apache.org/jira/browse/SQOOP-387
>             Project: Sqoop
>          Issue Type: Improvement
>          Components: connectors/postgresql
>    Affects Versions: 1.4.2
>            Reporter: Shinichi Yamashita
>              Labels: newbie
>         Attachments: SQOOP-387.patch, SQOOP-387.patch
> PostgreSQLManager uses "DELETE" sentence for procesing in staging-table.
> When it does "EXPORT" many times, the processing time is prolonged in "DELETE".
> Therefore replace it with "TRUNCATE" sentence and improve performance.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message