hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject hive git commit: HIVE-16399 : create an index for tc_txnid in TXN_COMPONENTS (Wei Zheng, reviewed by Eugene Koifman)
Date Tue, 02 May 2017 02:24:16 GMT
Repository: hive
Updated Branches:
  refs/heads/branch-2 5024ea2b9 -> addb7173b


HIVE-16399 : create an index for tc_txnid in TXN_COMPONENTS (Wei Zheng, reviewed by Eugene
Koifman)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/addb7173
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/addb7173
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/addb7173

Branch: refs/heads/branch-2
Commit: addb7173b85f0c57264ea3544ae7d2fa67efe07b
Parents: 5024ea2
Author: Wei Zheng <weiz@apache.org>
Authored: Mon May 1 19:24:08 2017 -0700
Committer: Wei Zheng <weiz@apache.org>
Committed: Mon May 1 19:24:08 2017 -0700

----------------------------------------------------------------------
 metastore/scripts/upgrade/derby/040-HIVE-16399.derby.sql           | 1 +
 metastore/scripts/upgrade/derby/hive-txn-schema-2.3.0.derby.sql    | 2 ++
 metastore/scripts/upgrade/derby/upgrade-2.2.0-to-2.3.0.derby.sql   | 1 +
 metastore/scripts/upgrade/mssql/025-HIVE-16399.mssql.sql           | 1 +
 metastore/scripts/upgrade/mssql/hive-schema-2.3.0.mssql.sql        | 2 ++
 metastore/scripts/upgrade/mssql/upgrade-2.2.0-to-2.3.0.mssql.sql   | 2 ++
 metastore/scripts/upgrade/mysql/040-HIVE-16399.mysql.sql           | 1 +
 metastore/scripts/upgrade/mysql/hive-txn-schema-2.3.0.mysql.sql    | 2 ++
 metastore/scripts/upgrade/mysql/upgrade-2.2.0-to-2.3.0.mysql.sql   | 2 ++
 metastore/scripts/upgrade/oracle/040-HIVE-16399.oracle.sql         | 1 +
 metastore/scripts/upgrade/oracle/hive-txn-schema-2.3.0.oracle.sql  | 2 ++
 metastore/scripts/upgrade/oracle/upgrade-2.2.0-to-2.3.0.oracle.sql | 2 ++
 metastore/scripts/upgrade/postgres/039-HIVE-16399.postgres.sql     | 1 +
 .../scripts/upgrade/postgres/hive-txn-schema-2.3.0.postgres.sql    | 2 ++
 .../scripts/upgrade/postgres/upgrade-2.2.0-to-2.3.0.postgres.sql   | 2 ++
 15 files changed, 24 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/addb7173/metastore/scripts/upgrade/derby/040-HIVE-16399.derby.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/derby/040-HIVE-16399.derby.sql b/metastore/scripts/upgrade/derby/040-HIVE-16399.derby.sql
new file mode 100644
index 0000000..f6cc31f
--- /dev/null
+++ b/metastore/scripts/upgrade/derby/040-HIVE-16399.derby.sql
@@ -0,0 +1 @@
+CREATE INDEX TC_TXNID_INDEX ON TXN_COMPONENTS (TC_TXNID);

http://git-wip-us.apache.org/repos/asf/hive/blob/addb7173/metastore/scripts/upgrade/derby/hive-txn-schema-2.3.0.derby.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/derby/hive-txn-schema-2.3.0.derby.sql b/metastore/scripts/upgrade/derby/hive-txn-schema-2.3.0.derby.sql
index 3a049aa..52713df 100644
--- a/metastore/scripts/upgrade/derby/hive-txn-schema-2.3.0.derby.sql
+++ b/metastore/scripts/upgrade/derby/hive-txn-schema-2.3.0.derby.sql
@@ -36,6 +36,8 @@ CREATE TABLE TXN_COMPONENTS (
   TC_OPERATION_TYPE char(1) NOT NULL
 );
 
+CREATE INDEX TC_TXNID_INDEX ON TXN_COMPONENTS (TC_TXNID);
+
 CREATE TABLE COMPLETED_TXN_COMPONENTS (
   CTC_TXNID bigint,
   CTC_DATABASE varchar(128) NOT NULL,

http://git-wip-us.apache.org/repos/asf/hive/blob/addb7173/metastore/scripts/upgrade/derby/upgrade-2.2.0-to-2.3.0.derby.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/derby/upgrade-2.2.0-to-2.3.0.derby.sql b/metastore/scripts/upgrade/derby/upgrade-2.2.0-to-2.3.0.derby.sql
index b638591..81b9973 100644
--- a/metastore/scripts/upgrade/derby/upgrade-2.2.0-to-2.3.0.derby.sql
+++ b/metastore/scripts/upgrade/derby/upgrade-2.2.0-to-2.3.0.derby.sql
@@ -1,3 +1,4 @@
 -- Upgrade MetaStore schema from 2.2.0 to 2.3.0
+RUN '040-HIVE-16399.derby.sql';
 
 UPDATE "APP".VERSION SET SCHEMA_VERSION='2.3.0', VERSION_COMMENT='Hive release version 2.3.0'
where VER_ID=1;

http://git-wip-us.apache.org/repos/asf/hive/blob/addb7173/metastore/scripts/upgrade/mssql/025-HIVE-16399.mssql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mssql/025-HIVE-16399.mssql.sql b/metastore/scripts/upgrade/mssql/025-HIVE-16399.mssql.sql
new file mode 100644
index 0000000..f6cc31f
--- /dev/null
+++ b/metastore/scripts/upgrade/mssql/025-HIVE-16399.mssql.sql
@@ -0,0 +1 @@
+CREATE INDEX TC_TXNID_INDEX ON TXN_COMPONENTS (TC_TXNID);

http://git-wip-us.apache.org/repos/asf/hive/blob/addb7173/metastore/scripts/upgrade/mssql/hive-schema-2.3.0.mssql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mssql/hive-schema-2.3.0.mssql.sql b/metastore/scripts/upgrade/mssql/hive-schema-2.3.0.mssql.sql
index a84589f..8a80a50 100644
--- a/metastore/scripts/upgrade/mssql/hive-schema-2.3.0.mssql.sql
+++ b/metastore/scripts/upgrade/mssql/hive-schema-2.3.0.mssql.sql
@@ -974,6 +974,8 @@ CREATE TABLE TXN_COMPONENTS(
 
 ALTER TABLE TXN_COMPONENTS  WITH CHECK ADD FOREIGN KEY(TC_TXNID) REFERENCES TXNS (TXN_ID);
 
+CREATE INDEX TC_TXNID_INDEX ON TXN_COMPONENTS (TC_TXNID);
+
 CREATE TABLE AUX_TABLE (
   MT_KEY1 nvarchar(128) NOT NULL,
   MT_KEY2 bigint NOT NULL,

http://git-wip-us.apache.org/repos/asf/hive/blob/addb7173/metastore/scripts/upgrade/mssql/upgrade-2.2.0-to-2.3.0.mssql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mssql/upgrade-2.2.0-to-2.3.0.mssql.sql b/metastore/scripts/upgrade/mssql/upgrade-2.2.0-to-2.3.0.mssql.sql
index ae238bd..04dafba 100644
--- a/metastore/scripts/upgrade/mssql/upgrade-2.2.0-to-2.3.0.mssql.sql
+++ b/metastore/scripts/upgrade/mssql/upgrade-2.2.0-to-2.3.0.mssql.sql
@@ -1,4 +1,6 @@
 SELECT 'Upgrading MetaStore schema from 2.2.0 to 2.3.0' AS MESSAGE;
 
+:r 025-HIVE-16399.mssql.sql
+
 UPDATE VERSION SET SCHEMA_VERSION='2.3.0', VERSION_COMMENT='Hive release version 2.3.0' where
VER_ID=1;
 SELECT 'Finished upgrading MetaStore schema from 2.2.0 to 2.3.0' AS MESSAGE;

http://git-wip-us.apache.org/repos/asf/hive/blob/addb7173/metastore/scripts/upgrade/mysql/040-HIVE-16399.mysql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mysql/040-HIVE-16399.mysql.sql b/metastore/scripts/upgrade/mysql/040-HIVE-16399.mysql.sql
new file mode 100644
index 0000000..f6cc31f
--- /dev/null
+++ b/metastore/scripts/upgrade/mysql/040-HIVE-16399.mysql.sql
@@ -0,0 +1 @@
+CREATE INDEX TC_TXNID_INDEX ON TXN_COMPONENTS (TC_TXNID);

http://git-wip-us.apache.org/repos/asf/hive/blob/addb7173/metastore/scripts/upgrade/mysql/hive-txn-schema-2.3.0.mysql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mysql/hive-txn-schema-2.3.0.mysql.sql b/metastore/scripts/upgrade/mysql/hive-txn-schema-2.3.0.mysql.sql
index ac39a32..1df32c4 100644
--- a/metastore/scripts/upgrade/mysql/hive-txn-schema-2.3.0.mysql.sql
+++ b/metastore/scripts/upgrade/mysql/hive-txn-schema-2.3.0.mysql.sql
@@ -38,6 +38,8 @@ CREATE TABLE TXN_COMPONENTS (
   FOREIGN KEY (TC_TXNID) REFERENCES TXNS (TXN_ID)
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
+CREATE INDEX TC_TXNID_INDEX ON TXN_COMPONENTS (TC_TXNID);
+
 CREATE TABLE COMPLETED_TXN_COMPONENTS (
   CTC_TXNID bigint NOT NULL,
   CTC_DATABASE varchar(128) NOT NULL,

http://git-wip-us.apache.org/repos/asf/hive/blob/addb7173/metastore/scripts/upgrade/mysql/upgrade-2.2.0-to-2.3.0.mysql.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/mysql/upgrade-2.2.0-to-2.3.0.mysql.sql b/metastore/scripts/upgrade/mysql/upgrade-2.2.0-to-2.3.0.mysql.sql
index 210423e..9da8757 100644
--- a/metastore/scripts/upgrade/mysql/upgrade-2.2.0-to-2.3.0.mysql.sql
+++ b/metastore/scripts/upgrade/mysql/upgrade-2.2.0-to-2.3.0.mysql.sql
@@ -1,5 +1,7 @@
 SELECT 'Upgrading MetaStore schema from 2.2.0 to 2.3.0' AS ' ';
 
+SOURCE 040-HIVE-16399.mysql.sql;
+
 UPDATE VERSION SET SCHEMA_VERSION='2.3.0', VERSION_COMMENT='Hive release version 2.3.0' where
VER_ID=1;
 SELECT 'Finished upgrading MetaStore schema from 2.2.0 to 2.3.0' AS ' ';
 

http://git-wip-us.apache.org/repos/asf/hive/blob/addb7173/metastore/scripts/upgrade/oracle/040-HIVE-16399.oracle.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/oracle/040-HIVE-16399.oracle.sql b/metastore/scripts/upgrade/oracle/040-HIVE-16399.oracle.sql
new file mode 100644
index 0000000..f6cc31f
--- /dev/null
+++ b/metastore/scripts/upgrade/oracle/040-HIVE-16399.oracle.sql
@@ -0,0 +1 @@
+CREATE INDEX TC_TXNID_INDEX ON TXN_COMPONENTS (TC_TXNID);

http://git-wip-us.apache.org/repos/asf/hive/blob/addb7173/metastore/scripts/upgrade/oracle/hive-txn-schema-2.3.0.oracle.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/oracle/hive-txn-schema-2.3.0.oracle.sql b/metastore/scripts/upgrade/oracle/hive-txn-schema-2.3.0.oracle.sql
index 80adfc2..12c24a5 100644
--- a/metastore/scripts/upgrade/oracle/hive-txn-schema-2.3.0.oracle.sql
+++ b/metastore/scripts/upgrade/oracle/hive-txn-schema-2.3.0.oracle.sql
@@ -37,6 +37,8 @@ CREATE TABLE TXN_COMPONENTS (
   TC_OPERATION_TYPE char(1) NOT NULL
 ) ROWDEPENDENCIES;
 
+CREATE INDEX TC_TXNID_INDEX ON TXN_COMPONENTS (TC_TXNID);
+
 CREATE TABLE COMPLETED_TXN_COMPONENTS (
   CTC_TXNID NUMBER(19),
   CTC_DATABASE varchar(128) NOT NULL,

http://git-wip-us.apache.org/repos/asf/hive/blob/addb7173/metastore/scripts/upgrade/oracle/upgrade-2.2.0-to-2.3.0.oracle.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/oracle/upgrade-2.2.0-to-2.3.0.oracle.sql b/metastore/scripts/upgrade/oracle/upgrade-2.2.0-to-2.3.0.oracle.sql
index a936d42..64a3313 100644
--- a/metastore/scripts/upgrade/oracle/upgrade-2.2.0-to-2.3.0.oracle.sql
+++ b/metastore/scripts/upgrade/oracle/upgrade-2.2.0-to-2.3.0.oracle.sql
@@ -1,4 +1,6 @@
 SELECT 'Upgrading MetaStore schema from 2.2.0 to 2.3.0' AS Status from dual;
 
+@040-HIVE-16399.oracle.sql;
+
 UPDATE VERSION SET SCHEMA_VERSION='2.3.0', VERSION_COMMENT='Hive release version 2.3.0' where
VER_ID=1;
 SELECT 'Finished upgrading MetaStore schema from 2.2.0 to 2.3.0' AS Status from dual;

http://git-wip-us.apache.org/repos/asf/hive/blob/addb7173/metastore/scripts/upgrade/postgres/039-HIVE-16399.postgres.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/postgres/039-HIVE-16399.postgres.sql b/metastore/scripts/upgrade/postgres/039-HIVE-16399.postgres.sql
new file mode 100644
index 0000000..18157bf
--- /dev/null
+++ b/metastore/scripts/upgrade/postgres/039-HIVE-16399.postgres.sql
@@ -0,0 +1 @@
+CREATE INDEX TC_TXNID_INDEX ON TXN_COMPONENTS USING hash (TC_TXNID);

http://git-wip-us.apache.org/repos/asf/hive/blob/addb7173/metastore/scripts/upgrade/postgres/hive-txn-schema-2.3.0.postgres.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/postgres/hive-txn-schema-2.3.0.postgres.sql b/metastore/scripts/upgrade/postgres/hive-txn-schema-2.3.0.postgres.sql
index 8471c32..1fa99af 100644
--- a/metastore/scripts/upgrade/postgres/hive-txn-schema-2.3.0.postgres.sql
+++ b/metastore/scripts/upgrade/postgres/hive-txn-schema-2.3.0.postgres.sql
@@ -37,6 +37,8 @@ CREATE TABLE TXN_COMPONENTS (
   TC_OPERATION_TYPE char(1) NOT NULL
 );
 
+CREATE INDEX TC_TXNID_INDEX ON TXN_COMPONENTS USING hash (TC_TXNID);
+
 CREATE TABLE COMPLETED_TXN_COMPONENTS (
   CTC_TXNID bigint,
   CTC_DATABASE varchar(128) NOT NULL,

http://git-wip-us.apache.org/repos/asf/hive/blob/addb7173/metastore/scripts/upgrade/postgres/upgrade-2.2.0-to-2.3.0.postgres.sql
----------------------------------------------------------------------
diff --git a/metastore/scripts/upgrade/postgres/upgrade-2.2.0-to-2.3.0.postgres.sql b/metastore/scripts/upgrade/postgres/upgrade-2.2.0-to-2.3.0.postgres.sql
index b27ce6b..77358df 100644
--- a/metastore/scripts/upgrade/postgres/upgrade-2.2.0-to-2.3.0.postgres.sql
+++ b/metastore/scripts/upgrade/postgres/upgrade-2.2.0-to-2.3.0.postgres.sql
@@ -1,5 +1,7 @@
 SELECT 'Upgrading MetaStore schema from 2.2.0 to 2.3.0';
 
+\i 039-HIVE-16399.postgres.sql;
+
 UPDATE "VERSION" SET "SCHEMA_VERSION"='2.3.0', "VERSION_COMMENT"='Hive release version 2.3.0'
where "VER_ID"=1;
 SELECT 'Finished upgrading MetaStore schema from 2.2.0 to 2.3.0';
 


Mime
View raw message