Skip to content

Commit

Permalink
Reduce the time cost of getCatalogTable in jdbc
Browse files Browse the repository at this point in the history
  • Loading branch information
ruanwenjun committed Nov 23, 2023
1 parent ed5eadc commit b215943
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ protected List<ConstraintKey> getConstraintKeys(
protected List<ConstraintKey> getConstraintKeys(
DatabaseMetaData metaData, String database, String schema, String table)
throws SQLException {
// We set approximate to true to avoid querying the statistics table, which is slow.
ResultSet resultSet = metaData.getIndexInfo(database, schema, table, false, false);
// index name -> index
Map<String, ConstraintKey> constraintKeyMap = new HashMap<>();
Expand Down

0 comments on commit b215943

Please sign in to comment.