From 57650f08e35ec91e511fcda54489f28bc0b1b4b5 Mon Sep 17 00:00:00 2001 From: Lukas Eder Date: Fri, 15 Aug 2014 13:56:04 +0200 Subject: [PATCH] [#3560] Slow discovery of primary keys in very large MySQL databases --- .../org/jooq/util/mysql/MySQLDatabase.java | 61 ++++----- .../information_schema/InformationSchema.java | 5 +- .../util/mysql/information_schema/Tables.java | 7 +- .../information_schema/tables/Columns.java | 4 +- .../tables/KeyColumnUsage.java | 4 +- .../information_schema/tables/Parameters.java | 4 +- .../tables/ReferentialConstraints.java | 4 +- .../information_schema/tables/Schemata.java | 4 +- .../information_schema/tables/Statistics.java | 123 ++++++++++++++++++ .../tables/TableConstraints.java | 4 +- .../information_schema/tables/Tables.java | 4 +- jOOQ-test/pom.xml | 2 +- 12 files changed, 179 insertions(+), 47 deletions(-) create mode 100644 jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/tables/Statistics.java diff --git a/jOOQ-meta/src/main/java/org/jooq/util/mysql/MySQLDatabase.java b/jOOQ-meta/src/main/java/org/jooq/util/mysql/MySQLDatabase.java index ba6be43959..c611050e45 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/mysql/MySQLDatabase.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/mysql/MySQLDatabase.java @@ -41,12 +41,13 @@ package org.jooq.util.mysql; +import static org.jooq.impl.DSL.inline; import static org.jooq.util.mysql.information_schema.Tables.COLUMNS; import static org.jooq.util.mysql.information_schema.Tables.KEY_COLUMN_USAGE; import static org.jooq.util.mysql.information_schema.Tables.REFERENTIAL_CONSTRAINTS; import static org.jooq.util.mysql.information_schema.Tables.SCHEMATA; +import static org.jooq.util.mysql.information_schema.Tables.STATISTICS; import static org.jooq.util.mysql.information_schema.Tables.TABLES; -import static org.jooq.util.mysql.information_schema.Tables.TABLE_CONSTRAINTS; import static org.jooq.util.mysql.mysql.tables.Proc.DB; import static org.jooq.util.mysql.mysql.tables.Proc.PROC; @@ -85,7 +86,7 @@ import org.jooq.util.mysql.information_schema.tables.Columns; import org.jooq.util.mysql.information_schema.tables.KeyColumnUsage; import org.jooq.util.mysql.information_schema.tables.ReferentialConstraints; import org.jooq.util.mysql.information_schema.tables.Schemata; -import org.jooq.util.mysql.information_schema.tables.TableConstraints; +import org.jooq.util.mysql.information_schema.tables.Statistics; import org.jooq.util.mysql.information_schema.tables.Tables; import org.jooq.util.mysql.mysql.enums.ProcType; import org.jooq.util.mysql.mysql.tables.Proc; @@ -99,11 +100,11 @@ public class MySQLDatabase extends AbstractDatabase { @Override protected void loadPrimaryKeys(DefaultRelations relations) throws SQLException { - for (Record record : fetchKeys("PRIMARY KEY")) { - SchemaDefinition schema = getSchema(record.getValue(KeyColumnUsage.TABLE_SCHEMA)); - String constraintName = record.getValue(KeyColumnUsage.CONSTRAINT_NAME); - String tableName = record.getValue(KeyColumnUsage.TABLE_NAME); - String columnName = record.getValue(KeyColumnUsage.COLUMN_NAME); + for (Record record : fetchKeys(true)) { + SchemaDefinition schema = getSchema(record.getValue(Statistics.TABLE_SCHEMA)); + String constraintName = record.getValue(Statistics.INDEX_NAME); + String tableName = record.getValue(Statistics.TABLE_NAME); + String columnName = record.getValue(Statistics.COLUMN_NAME); String key = getKeyName(tableName, constraintName); TableDefinition table = getTable(schema, tableName); @@ -116,11 +117,11 @@ public class MySQLDatabase extends AbstractDatabase { @Override protected void loadUniqueKeys(DefaultRelations relations) throws SQLException { - for (Record record : fetchKeys("UNIQUE")) { - SchemaDefinition schema = getSchema(record.getValue(KeyColumnUsage.TABLE_SCHEMA)); - String constraintName = record.getValue(KeyColumnUsage.CONSTRAINT_NAME); - String tableName = record.getValue(KeyColumnUsage.TABLE_NAME); - String columnName = record.getValue(KeyColumnUsage.COLUMN_NAME); + for (Record record : fetchKeys(false)) { + SchemaDefinition schema = getSchema(record.getValue(Statistics.TABLE_SCHEMA)); + String constraintName = record.getValue(Statistics.INDEX_NAME); + String tableName = record.getValue(Statistics.TABLE_NAME); + String columnName = record.getValue(Statistics.COLUMN_NAME); String key = getKeyName(tableName, constraintName); TableDefinition table = getTable(schema, tableName); @@ -135,24 +136,26 @@ public class MySQLDatabase extends AbstractDatabase { return "KEY_" + tableName + "_" + keyName; } - private Result> fetchKeys(String constraintType) { + private Result> fetchKeys(boolean primary) { + + // [#3560] It has been shown that querying the STATISTICS table is much faster on + // very large databases than going through TABLE_CONSTRAINTS and KEY_COLUMN_USAGE return create().select( - KeyColumnUsage.TABLE_SCHEMA, - KeyColumnUsage.CONSTRAINT_NAME, - KeyColumnUsage.TABLE_NAME, - KeyColumnUsage.COLUMN_NAME) - .from(KEY_COLUMN_USAGE) - .join(TABLE_CONSTRAINTS) - .on(KeyColumnUsage.TABLE_SCHEMA.equal(TableConstraints.TABLE_SCHEMA)) - .and(KeyColumnUsage.TABLE_NAME.equal(TableConstraints.TABLE_NAME)) - .and(KeyColumnUsage.CONSTRAINT_NAME.equal(TableConstraints.CONSTRAINT_NAME)) - .where(TableConstraints.CONSTRAINT_TYPE.equal(constraintType)) - .and(KeyColumnUsage.TABLE_SCHEMA.in(getInputSchemata())) - .orderBy( - KeyColumnUsage.TABLE_SCHEMA.asc(), - KeyColumnUsage.TABLE_NAME.asc(), - KeyColumnUsage.ORDINAL_POSITION.asc()) - .fetch(); + Statistics.TABLE_SCHEMA, + Statistics.TABLE_NAME, + Statistics.COLUMN_NAME, + Statistics.INDEX_NAME) + .from(STATISTICS) + .where(Statistics.TABLE_SCHEMA.in(getInputSchemata())) + .and(primary + ? Statistics.INDEX_NAME.eq(inline("PRIMARY")) + : Statistics.INDEX_NAME.ne(inline("PRIMARY")).and(Statistics.NON_UNIQUE.eq(inline(0L)))) + .orderBy( + Statistics.TABLE_SCHEMA, + Statistics.TABLE_NAME, + Statistics.INDEX_NAME, + Statistics.SEQ_IN_INDEX) + .fetch(); } @Override diff --git a/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/InformationSchema.java b/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/InformationSchema.java index 4d1a6c24f5..8080a4e069 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/InformationSchema.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/InformationSchema.java @@ -6,12 +6,12 @@ package org.jooq.util.mysql.information_schema; /** * This class is generated by jOOQ. */ -@javax.annotation.Generated(value = { "http://www.jooq.org", "3.4.0" }, +@javax.annotation.Generated(value = { "http://www.jooq.org", "3.5.0" }, comments = "This class is generated by jOOQ") @java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class InformationSchema extends org.jooq.impl.SchemaImpl { - private static final long serialVersionUID = -611052785; + private static final long serialVersionUID = -679998315; /** * The singleton instance of information_schema @@ -39,6 +39,7 @@ public class InformationSchema extends org.jooq.impl.SchemaImpl { org.jooq.util.mysql.information_schema.tables.Parameters.PARAMETERS, org.jooq.util.mysql.information_schema.tables.ReferentialConstraints.REFERENTIAL_CONSTRAINTS, org.jooq.util.mysql.information_schema.tables.Schemata.SCHEMATA, + org.jooq.util.mysql.information_schema.tables.Statistics.STATISTICS, org.jooq.util.mysql.information_schema.tables.Tables.TABLES, org.jooq.util.mysql.information_schema.tables.TableConstraints.TABLE_CONSTRAINTS); } diff --git a/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/Tables.java b/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/Tables.java index 416f67f8af..83fcde185d 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/Tables.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/Tables.java @@ -8,7 +8,7 @@ package org.jooq.util.mysql.information_schema; * * Convenience access to all tables in information_schema */ -@javax.annotation.Generated(value = { "http://www.jooq.org", "3.4.0" }, +@javax.annotation.Generated(value = { "http://www.jooq.org", "3.5.0" }, comments = "This class is generated by jOOQ") @java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class Tables { @@ -38,6 +38,11 @@ public class Tables { */ public static final org.jooq.util.mysql.information_schema.tables.Schemata SCHEMATA = org.jooq.util.mysql.information_schema.tables.Schemata.SCHEMATA; + /** + * The table information_schema.STATISTICS + */ + public static final org.jooq.util.mysql.information_schema.tables.Statistics STATISTICS = org.jooq.util.mysql.information_schema.tables.Statistics.STATISTICS; + /** * The table information_schema.TABLES */ diff --git a/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/tables/Columns.java b/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/tables/Columns.java index b7bb60c838..5afe2b636e 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/tables/Columns.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/tables/Columns.java @@ -6,12 +6,12 @@ package org.jooq.util.mysql.information_schema.tables; /** * This class is generated by jOOQ. */ -@javax.annotation.Generated(value = { "http://www.jooq.org", "3.4.0" }, +@javax.annotation.Generated(value = { "http://www.jooq.org", "3.5.0" }, comments = "This class is generated by jOOQ") @java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class Columns extends org.jooq.impl.TableImpl { - private static final long serialVersionUID = -840872510; + private static final long serialVersionUID = -1192516157; /** * The singleton instance of information_schema.COLUMNS diff --git a/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/tables/KeyColumnUsage.java b/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/tables/KeyColumnUsage.java index 8509b919f5..7200918fff 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/tables/KeyColumnUsage.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/tables/KeyColumnUsage.java @@ -6,12 +6,12 @@ package org.jooq.util.mysql.information_schema.tables; /** * This class is generated by jOOQ. */ -@javax.annotation.Generated(value = { "http://www.jooq.org", "3.4.0" }, +@javax.annotation.Generated(value = { "http://www.jooq.org", "3.5.0" }, comments = "This class is generated by jOOQ") @java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class KeyColumnUsage extends org.jooq.impl.TableImpl { - private static final long serialVersionUID = -1303145965; + private static final long serialVersionUID = -669574892; /** * The singleton instance of information_schema.KEY_COLUMN_USAGE diff --git a/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/tables/Parameters.java b/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/tables/Parameters.java index 54390f00e1..1bd2b75144 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/tables/Parameters.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/tables/Parameters.java @@ -6,12 +6,12 @@ package org.jooq.util.mysql.information_schema.tables; /** * This class is generated by jOOQ. */ -@javax.annotation.Generated(value = { "http://www.jooq.org", "3.4.0" }, +@javax.annotation.Generated(value = { "http://www.jooq.org", "3.5.0" }, comments = "This class is generated by jOOQ") @java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class Parameters extends org.jooq.impl.TableImpl { - private static final long serialVersionUID = -564000748; + private static final long serialVersionUID = 1665633877; /** * The singleton instance of information_schema.PARAMETERS diff --git a/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/tables/ReferentialConstraints.java b/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/tables/ReferentialConstraints.java index 09fe7a2210..6509fe4033 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/tables/ReferentialConstraints.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/tables/ReferentialConstraints.java @@ -6,12 +6,12 @@ package org.jooq.util.mysql.information_schema.tables; /** * This class is generated by jOOQ. */ -@javax.annotation.Generated(value = { "http://www.jooq.org", "3.4.0" }, +@javax.annotation.Generated(value = { "http://www.jooq.org", "3.5.0" }, comments = "This class is generated by jOOQ") @java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class ReferentialConstraints extends org.jooq.impl.TableImpl { - private static final long serialVersionUID = -514911080; + private static final long serialVersionUID = 1234359031; /** * The singleton instance of information_schema.REFERENTIAL_CONSTRAINTS diff --git a/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/tables/Schemata.java b/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/tables/Schemata.java index 329b049926..2a00f18863 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/tables/Schemata.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/tables/Schemata.java @@ -6,12 +6,12 @@ package org.jooq.util.mysql.information_schema.tables; /** * This class is generated by jOOQ. */ -@javax.annotation.Generated(value = { "http://www.jooq.org", "3.4.0" }, +@javax.annotation.Generated(value = { "http://www.jooq.org", "3.5.0" }, comments = "This class is generated by jOOQ") @java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class Schemata extends org.jooq.impl.TableImpl { - private static final long serialVersionUID = 1266409808; + private static final long serialVersionUID = -2145867409; /** * The singleton instance of information_schema.SCHEMATA diff --git a/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/tables/Statistics.java b/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/tables/Statistics.java new file mode 100644 index 0000000000..2919629e2b --- /dev/null +++ b/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/tables/Statistics.java @@ -0,0 +1,123 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.util.mysql.information_schema.tables; + +/** + * This class is generated by jOOQ. + */ +@javax.annotation.Generated(value = { "http://www.jooq.org", "3.5.0" }, + comments = "This class is generated by jOOQ") +@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class Statistics extends org.jooq.impl.TableImpl { + + private static final long serialVersionUID = 357430055; + + /** + * The singleton instance of information_schema.STATISTICS + */ + public static final org.jooq.util.mysql.information_schema.tables.Statistics STATISTICS = new org.jooq.util.mysql.information_schema.tables.Statistics(); + + /** + * The class holding records for this type + */ + @Override + public java.lang.Class getRecordType() { + return org.jooq.Record.class; + } + + /** + * The column information_schema.STATISTICS.TABLE_CATALOG. + */ + public static final org.jooq.TableField TABLE_CATALOG = createField("TABLE_CATALOG", org.jooq.impl.SQLDataType.VARCHAR.length(512).nullable(false).defaulted(true), STATISTICS, ""); + + /** + * The column information_schema.STATISTICS.TABLE_SCHEMA. + */ + public static final org.jooq.TableField TABLE_SCHEMA = createField("TABLE_SCHEMA", org.jooq.impl.SQLDataType.VARCHAR.length(64).nullable(false).defaulted(true), STATISTICS, ""); + + /** + * The column information_schema.STATISTICS.TABLE_NAME. + */ + public static final org.jooq.TableField TABLE_NAME = createField("TABLE_NAME", org.jooq.impl.SQLDataType.VARCHAR.length(64).nullable(false).defaulted(true), STATISTICS, ""); + + /** + * The column information_schema.STATISTICS.NON_UNIQUE. + */ + public static final org.jooq.TableField NON_UNIQUE = createField("NON_UNIQUE", org.jooq.impl.SQLDataType.BIGINT.nullable(false).defaulted(true), STATISTICS, ""); + + /** + * The column information_schema.STATISTICS.INDEX_SCHEMA. + */ + public static final org.jooq.TableField INDEX_SCHEMA = createField("INDEX_SCHEMA", org.jooq.impl.SQLDataType.VARCHAR.length(64).nullable(false).defaulted(true), STATISTICS, ""); + + /** + * The column information_schema.STATISTICS.INDEX_NAME. + */ + public static final org.jooq.TableField INDEX_NAME = createField("INDEX_NAME", org.jooq.impl.SQLDataType.VARCHAR.length(64).nullable(false).defaulted(true), STATISTICS, ""); + + /** + * The column information_schema.STATISTICS.SEQ_IN_INDEX. + */ + public static final org.jooq.TableField SEQ_IN_INDEX = createField("SEQ_IN_INDEX", org.jooq.impl.SQLDataType.BIGINT.nullable(false).defaulted(true), STATISTICS, ""); + + /** + * The column information_schema.STATISTICS.COLUMN_NAME. + */ + public static final org.jooq.TableField COLUMN_NAME = createField("COLUMN_NAME", org.jooq.impl.SQLDataType.VARCHAR.length(64).nullable(false).defaulted(true), STATISTICS, ""); + + /** + * The column information_schema.STATISTICS.COLLATION. + */ + public static final org.jooq.TableField COLLATION = createField("COLLATION", org.jooq.impl.SQLDataType.VARCHAR.length(1), STATISTICS, ""); + + /** + * The column information_schema.STATISTICS.CARDINALITY. + */ + public static final org.jooq.TableField CARDINALITY = createField("CARDINALITY", org.jooq.impl.SQLDataType.BIGINT, STATISTICS, ""); + + /** + * The column information_schema.STATISTICS.SUB_PART. + */ + public static final org.jooq.TableField SUB_PART = createField("SUB_PART", org.jooq.impl.SQLDataType.BIGINT, STATISTICS, ""); + + /** + * The column information_schema.STATISTICS.PACKED. + */ + public static final org.jooq.TableField PACKED = createField("PACKED", org.jooq.impl.SQLDataType.VARCHAR.length(10), STATISTICS, ""); + + /** + * The column information_schema.STATISTICS.NULLABLE. + */ + public static final org.jooq.TableField NULLABLE = createField("NULLABLE", org.jooq.impl.SQLDataType.VARCHAR.length(3).nullable(false).defaulted(true), STATISTICS, ""); + + /** + * The column information_schema.STATISTICS.INDEX_TYPE. + */ + public static final org.jooq.TableField INDEX_TYPE = createField("INDEX_TYPE", org.jooq.impl.SQLDataType.VARCHAR.length(16).nullable(false).defaulted(true), STATISTICS, ""); + + /** + * The column information_schema.STATISTICS.COMMENT. + */ + public static final org.jooq.TableField COMMENT = createField("COMMENT", org.jooq.impl.SQLDataType.VARCHAR.length(16), STATISTICS, ""); + + /** + * The column information_schema.STATISTICS.INDEX_COMMENT. + */ + public static final org.jooq.TableField INDEX_COMMENT = createField("INDEX_COMMENT", org.jooq.impl.SQLDataType.VARCHAR.length(1024).nullable(false).defaulted(true), STATISTICS, ""); + + /** + * No further instances allowed + */ + private Statistics() { + this("STATISTICS", null); + } + + private Statistics(java.lang.String alias, org.jooq.Table aliased) { + this(alias, aliased, null); + } + + private Statistics(java.lang.String alias, org.jooq.Table aliased, org.jooq.Field[] parameters) { + super(alias, org.jooq.util.mysql.information_schema.InformationSchema.INFORMATION_SCHEMA, aliased, parameters, ""); + } +} diff --git a/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/tables/TableConstraints.java b/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/tables/TableConstraints.java index 99cc6605e1..cbb8543252 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/tables/TableConstraints.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/tables/TableConstraints.java @@ -6,12 +6,12 @@ package org.jooq.util.mysql.information_schema.tables; /** * This class is generated by jOOQ. */ -@javax.annotation.Generated(value = { "http://www.jooq.org", "3.4.0" }, +@javax.annotation.Generated(value = { "http://www.jooq.org", "3.5.0" }, comments = "This class is generated by jOOQ") @java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class TableConstraints extends org.jooq.impl.TableImpl { - private static final long serialVersionUID = 2008733278; + private static final long serialVersionUID = -1909788577; /** * The singleton instance of information_schema.TABLE_CONSTRAINTS diff --git a/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/tables/Tables.java b/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/tables/Tables.java index 8ba2d85271..f04b93e78c 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/tables/Tables.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/mysql/information_schema/tables/Tables.java @@ -6,12 +6,12 @@ package org.jooq.util.mysql.information_schema.tables; /** * This class is generated by jOOQ. */ -@javax.annotation.Generated(value = { "http://www.jooq.org", "3.4.0" }, +@javax.annotation.Generated(value = { "http://www.jooq.org", "3.5.0" }, comments = "This class is generated by jOOQ") @java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class Tables extends org.jooq.impl.TableImpl { - private static final long serialVersionUID = 1927949993; + private static final long serialVersionUID = 1728740650; /** * The singleton instance of information_schema.TABLES diff --git a/jOOQ-test/pom.xml b/jOOQ-test/pom.xml index 035bf69d23..ea0f262849 100644 --- a/jOOQ-test/pom.xml +++ b/jOOQ-test/pom.xml @@ -2468,7 +2468,7 @@ org.jooq.util.DefaultGenerator org.jooq.util.mysql.MySQLDatabase - COLUMNS|KEY_COLUMN_USAGE|PARAMETERS|REFERENTIAL_CONSTRAINTS|SCHEMATA|TABLE_CONSTRAINTS|TABLES + COLUMNS|KEY_COLUMN_USAGE|PARAMETERS|REFERENTIAL_CONSTRAINTS|SCHEMATA|STATISTICS|TABLE_CONSTRAINTS|TABLES