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 2019/11/26 08:57:45 UTC

[GitHub] [incubator-shardingsphere] beijing-penguin edited a comment on issue #3581: version 4.0.0-RC4 , how to make the application launch faster , when the sharding tables has millions data ?

beijing-penguin edited a comment on issue #3581: version 4.0.0-RC4 , how to make the application launch faster , when the sharding tables  has millions data ?
URL: https://github.com/apache/incubator-shardingsphere/issues/3581#issuecomment-558516676
 
 
   ①I read the sharding-jdbc code [dev],the TableMetaDataLoader#getLogicIndexes  method will only be executed once at my only sharding table sharding-config.
   ②I test the getIndexInfo method....as:
   ```
   Connection connection = dataSource1.getConnection();
           long start = System.currentTimeMillis();
           Collection<String> result = new HashSet<>();
           try (ResultSet resultSet = connection.getMetaData().getIndexInfo("orcl", "DC", "STUDENT_0", false, false)) {
               while (resultSet.next()) {
                   Optional<String> logicIndex = getLogicIndex(resultSet.getString("INDEX_NAME"), "STUDENT_0");
                   if (logicIndex.isPresent()) {
                       result.add(logicIndex.get());
                   }
               }
           }
           System.err.println("cost="+(System.currentTimeMillis()-start));
   ```
   cost=17
   A little cost....so can  you describe your test method?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services