gzgzapp opened a new issue, #12691:
URL: https://github.com/apache/shardingsphere/issues/12691
### Which version of ShardingSphere did you use?
5.0.0-alpha
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-JDBC
### Expected behavior
Start my app as soon as possible
### Actual behavior
Load meta data for schema logic_db finished, cost 127788 milliseconds.
### Reason analyze (If you can)
the method getIndexInfo() in jdbc has 5 param,the 5th param approximate,
when true, result is allowed to reflect approximate or out of data values; when
false, results are requested to be accurate,in the oracle jdbc implment, if
approximate is false, it will analyze table compute statistics, the table
records over 10 million,table compute statistics cost too much time, DBAs have
their own plans to analyze table compute statistics, so, the param approximate
can configure in the rule configuration file?
public static Collection<PhysicalIndexMetaData> load(final Connection
connection, final String table) throws SQLException {
Collection<PhysicalIndexMetaData> result = new HashSet<>();
try (ResultSet resultSet =
connection.getMetaData().getIndexInfo(connection.getCatalog(),
connection.getSchema(), table, false, false)) {
while (resultSet.next()) {
String indexName = resultSet.getString(INDEX_NAME);
if (null != indexName) {
result.add(new PhysicalIndexMetaData(indexName));
}
}
}
return result;
}
--
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:
[email protected]
For queries about this service, please contact Infrastructure at:
[email protected]