You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/09/09 00:51:08 UTC

[GitHub] [shardingsphere] agoodcoolman commented on issue #19884: It is slow to use JDBC connection shardingsphere proxy to write

agoodcoolman commented on issue #19884:
URL: https://github.com/apache/shardingsphere/issues/19884#issuecomment-1241377645

   I hava the same question .
   
   use Proxy 5.1.2 .
   this is command
   `java -server -Xmx8g -Xms8g -Xmn4g -Xss1024k -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:LargePageSizeInBytes=4g -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 -Dfile.encoding=UTF-8 -classpath %CLASS_PATH% %MAIN_CLASS%`
   
   
   server.yaml
   `rules:
     - !AUTHORITY
       users:
         - root@:XXXX
         - sharding@:XXXX
       provider:
         type: ALL_PRIVILEGES_PERMITTED
   
   props:
     max-connections-size-per-query: 1
     kernel-executor-size: 16  # Infinite by default.
     proxy-frontend-flush-threshold: 128  # The default value is 128.
     proxy-opentracing-enabled: false
     proxy-hint-enabled: false
     sql-show: true
     check-table-metadata-enabled: false`
   
   config-sharding.yaml
   `schemaName: sharding_db
   dataSources:
     ds0:
       url: jdbc:postgresql://XXX.XXX.XXX.XXXX:port/data
       username: [username]
       password: [password]
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
   
   rules:
     - !SHARDING
       tables:
         memberinfo:
           actualDataNodes: ds0.memberinfo_$->{[0,1,2,3,4,5,6,7,8,9]}
           tableStrategy:
             standard:
               shardingColumn: idcard
               shardingAlgorithmName: hash_mode10
         mzmember:
           actualDataNodes: ds0.mzmember_$->{[0,1,2,3]}
           tableStrategy:
             standard:
               shardingColumn: id_card
               shardingAlgorithmName: hash_mode4
         csvgonanhj:
           actualDataNodes: ds0.csvgonanhj_$->{[0,1,2,3,4,5,6,7,8,9]}
           tableStrategy:
             standard:
               shardingColumn: pid
               shardingAlgorithmName: hash_mode10
         memberresult:
           actualDataNodes: ds0.memberresult_$->{[0,1,2,3,4,5,6,7,8,9]}
           tableStrategy:
             standard:
               shardingColumn: idcard
               shardingAlgorithmName: hash_mode10
         applyinfo:
           actualDataNodes: ds0.applyinfo_$->{[0,1,2,3,4]}
           tableStrategy:
             standard:
               shardingColumn: idcard
               shardingAlgorithmName: hash_mode5
       defaultTableStrategy:
         none:
       shardingAlgorithms:
         hash_mode:
           type: HASH_MOD
           props:
             sharding-count: 1
         hash_mode10:
           type: HASH_MOD
           props:
             sharding-count: 10
         hash_mode4:
           type: HASH_MOD
           props:
             sharding-count: 4
         hash_mode5:
           type: HASH_MOD
           props:
             sharding-count: 5
       keyGenerators:
         snowflake:
           type: SNOWFLAKE
           props:
             worker-id: 123
       bindingTables:
         - memberinfo,csvgonanhj,memberresult`
   
   sql
   `select member_id, idcard, cast(substring(idcard, 7, 4) as int) as age1, cast(substring(idcard, 11, 2) as int) as age2 from memberresult limit 10 offset ?;`


-- 
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