You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sqoop.apache.org by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org> on 2012/03/09 18:33:00 UTC

[jira] [Commented] (SQOOP-387) Use TRUNCATE for PostgreSQLManager

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

jiraposter@reviews.apache.org commented on SQOOP-387:
-----------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4272/
-----------------------------------------------------------

Review request for Sqoop and Bilung Lee.


Summary
-------

I fixed SQOOP-387 patch.

1. I add getDeleteQuery method, which returns DELETE statement in SqlManager by default and returns TRUNCATE statement in PostgreSQLManager.
2. Modify deleteAllRecords method and migrateData method of SqlManager to use getDeleteQuery method.


This addresses bug SQOOP-387.
    https://issues.apache.org/jira/browse/SQOOP-387


Diffs
-----

  http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/manager/PostgresqlManager.java 1298894 
  http://svn.apache.org/repos/asf/incubator/sqoop/trunk/src/java/org/apache/sqoop/manager/SqlManager.java 1298894 

Diff: https://reviews.apache.org/r/4272/diff


Testing
-------

ant test
I confirmed "TRUNCATE TABLE" query was executed in PostgreSQL.


Thanks,

Shinichi


                
> Use TRUNCATE for PostgreSQLManager
> ----------------------------------
>
>                 Key: SQOOP-387
>                 URL: https://issues.apache.org/jira/browse/SQOOP-387
>             Project: Sqoop
>          Issue Type: Improvement
>          Components: connectors/postgresql
>            Reporter: Shinichi Yamashita
>         Attachments: 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira