You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "azexcy (via GitHub)" <gi...@apache.org> on 2023/02/09 09:53:54 UTC

[GitHub] [shardingsphere] azexcy commented on pull request #24075: Refactor DATA_MATCH consistency check by one query

azexcy commented on PR #24075:
URL: https://github.com/apache/shardingsphere/pull/24075#issuecomment-1423914317

   MySQL and PostgreSQL streaming query
   Streaming queries in mysql and postgresql are different
   
   ```
       /**
        * We only stream result sets when they are forward-only, read-only, and the
        * fetch size has been set to Integer.MIN_VALUE
        * 
        * @return true if this result set should be streamed row at-a-time, rather
        *         than read all at once.
        */
       protected boolean createStreamingResultSet() {
           return ((this.resultSetType == java.sql.ResultSet.TYPE_FORWARD_ONLY) && (this.resultSetConcurrency == java.sql.ResultSet.CONCUR_READ_ONLY)
                   && (this.fetchSize == Integer.MIN_VALUE));
       }
   ```
   
   PostgreSQL
   ```
       // Enable cursor-based resultset if possible.
       if (fetchSize > 0 && !wantsScrollableResultSet() && !connection.getAutoCommit()
           && !wantsHoldableResultSet()) {
         flags |= QueryExecutor.QUERY_FORWARD_CURSOR;
       }
   ```
   
   I will follow this, ensure that operations do not block during large data volumes.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org