[ 
https://issues.apache.org/jira/browse/BEAM-3714?focusedWorklogId=79535&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-79535
 ]

ASF GitHub Bot logged work on BEAM-3714:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 12/Mar/18 17:38
            Start Date: 12/Mar/18 17:38
    Worklog Time Spent: 10m 
      Work Description: evindj commented on issue #4786: [BEAM-3714]modified 
result set to be forward only and read only
URL: https://github.com/apache/beam/pull/4786#issuecomment-372397754
 
 
   Hi Eugene, I could not find time for it last week but updates comming up
   shortly
   
   On Mon, Mar 12, 2018 at 12:41 PM Eugene Kirpichov <notificati...@github.com>
   wrote:
   
   > @evindj <https://github.com/evindj> Any updates here?
   >
   > —
   > You are receiving this because you were mentioned.
   >
   >
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/beam/pull/4786#issuecomment-372377397>, or mute
   > the thread
   > 
<https://github.com/notifications/unsubscribe-auth/AEpiGgXjHARnl92Go_8xBq720CxmgEKrks5tdqVGgaJpZM4SZSK4>
   > .
   >
   -- 
   
   *DJIOFACK INNOCENT*
   *"Be better than the day before!" -*
   *+1 404 751 8024*
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 79535)
    Time Spent: 1h 10m  (was: 1h)

> JdbcIO.read() should create a forward-only, read-only result set
> ----------------------------------------------------------------
>
>                 Key: BEAM-3714
>                 URL: https://issues.apache.org/jira/browse/BEAM-3714
>             Project: Beam
>          Issue Type: Bug
>          Components: io-java-jdbc
>            Reporter: Eugene Kirpichov
>            Assignee: Innocent
>            Priority: Major
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> [https://stackoverflow.com/questions/48784889/streaming-data-from-cloudsql-into-dataflow/48819934#48819934]
>  - a user is trying to load a large table from MySQL, and the MySQL JDBC 
> driver requires special measures when loading large result sets.
> JdbcIO currently calls simply "connection.prepareStatement(query)" 
> https://github.com/apache/beam/blob/bb8c12c4956cbe3c6f2e57113e7c0ce2a5c05009/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcIO.java#L508
>  - it should specify type TYPE_FORWARD_ONLY and concurrency CONCUR_READ_ONLY 
> - these values should always be used.
> Seems that different databases have different requirements for streaming 
> result sets.
> E.g. MySQL requires setting fetch size; PostgreSQL says "The Connection must 
> not be in autocommit mode." 
> https://jdbc.postgresql.org/documentation/head/query.html#query-with-cursor . 
> Oracle, I think, doesn't have any special requirements but I don't know. 
> Fetch size should probably still be set to a reasonably large value.
> Seems that the common denominator of these requirements is: set fetch size to 
> a reasonably large but not maximum value; disable autocommit (there's nothing 
> to commit in read() anyway).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to