hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject svn commit: r1619569 - in /hive/trunk/metastore/scripts/upgrade: derby/ mssql/ mysql/ oracle/ postgres/
Date Thu, 21 Aug 2014 20:36:04 GMT
Author: hashutosh
Date: Thu Aug 21 20:36:03 2014
New Revision: 1619569

URL: http://svn.apache.org/r1619569
Log:
HIVE-7784 : Created the needed indexes on Hive.PART_COL_STATS for CBO (Mostafa Mokhtar via
Ashutosh Chauhan)

Added:
    hive/trunk/metastore/scripts/upgrade/derby/019-HIVE-7784.derby.sql
    hive/trunk/metastore/scripts/upgrade/mssql/002-HIVE-7784.mssql.sql
    hive/trunk/metastore/scripts/upgrade/mssql/upgrade-0.13.0-to-0.14.0.mssql.sql
    hive/trunk/metastore/scripts/upgrade/mysql/019-HIVE-7784.mysql.sql
    hive/trunk/metastore/scripts/upgrade/oracle/020-HIVE-7784.oracle.sql
    hive/trunk/metastore/scripts/upgrade/postgres/019-HIVE-7784.postgres.sql
Modified:
    hive/trunk/metastore/scripts/upgrade/derby/hive-schema-0.14.0.derby.sql
    hive/trunk/metastore/scripts/upgrade/derby/upgrade-0.13.0-to-0.14.0.derby.sql
    hive/trunk/metastore/scripts/upgrade/mssql/upgrade.order.mssql
    hive/trunk/metastore/scripts/upgrade/mysql/hive-schema-0.14.0.mysql.sql
    hive/trunk/metastore/scripts/upgrade/mysql/upgrade-0.13.0-to-0.14.0.mysql.sql
    hive/trunk/metastore/scripts/upgrade/oracle/hive-schema-0.14.0.oracle.sql
    hive/trunk/metastore/scripts/upgrade/oracle/upgrade-0.13.0-to-0.14.0.oracle.sql
    hive/trunk/metastore/scripts/upgrade/postgres/hive-schema-0.14.0.postgres.sql
    hive/trunk/metastore/scripts/upgrade/postgres/upgrade-0.13.0-to-0.14.0.postgres.sql

Added: hive/trunk/metastore/scripts/upgrade/derby/019-HIVE-7784.derby.sql
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/scripts/upgrade/derby/019-HIVE-7784.derby.sql?rev=1619569&view=auto
==============================================================================
--- hive/trunk/metastore/scripts/upgrade/derby/019-HIVE-7784.derby.sql (added)
+++ hive/trunk/metastore/scripts/upgrade/derby/019-HIVE-7784.derby.sql Thu Aug 21 20:36:03
2014
@@ -0,0 +1 @@
+CREATE INDEX "APP"."PCS_STATS_IDX" ON "APP"."PART_COL_STATS" ("DB_NAME","TABLE_NAME","COLUMN_NAME","PARTITION_NAME");

Modified: hive/trunk/metastore/scripts/upgrade/derby/hive-schema-0.14.0.derby.sql
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/scripts/upgrade/derby/hive-schema-0.14.0.derby.sql?rev=1619569&r1=1619568&r2=1619569&view=diff
==============================================================================
--- hive/trunk/metastore/scripts/upgrade/derby/hive-schema-0.14.0.derby.sql (original)
+++ hive/trunk/metastore/scripts/upgrade/derby/hive-schema-0.14.0.derby.sql Thu Aug 21 20:36:03
2014
@@ -114,6 +114,8 @@ CREATE INDEX "APP"."TABLECOLUMNPRIVILEGE
 
 CREATE UNIQUE INDEX "APP"."DBPRIVILEGEINDEX" ON "APP"."DB_PRIVS" ("DB_ID", "PRINCIPAL_NAME",
"PRINCIPAL_TYPE", "DB_PRIV", "GRANTOR", "GRANTOR_TYPE");
 
+CREATE INDEX "APP"."PCS_STATS_IDX" ON "APP"."PART_COL_STATS" ("DB_NAME","TABLE_NAME","COLUMN_NAME","PARTITION_NAME");
+
 CREATE INDEX "APP"."PARTPRIVILEGEINDEX" ON "APP"."PART_PRIVS" ("PART_ID", "PRINCIPAL_NAME",
"PRINCIPAL_TYPE", "PART_PRIV", "GRANTOR", "GRANTOR_TYPE");
 
 CREATE UNIQUE INDEX "APP"."ROLEENTITYINDEX" ON "APP"."ROLES" ("ROLE_NAME");

Modified: hive/trunk/metastore/scripts/upgrade/derby/upgrade-0.13.0-to-0.14.0.derby.sql
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/scripts/upgrade/derby/upgrade-0.13.0-to-0.14.0.derby.sql?rev=1619569&r1=1619568&r2=1619569&view=diff
==============================================================================
--- hive/trunk/metastore/scripts/upgrade/derby/upgrade-0.13.0-to-0.14.0.derby.sql (original)
+++ hive/trunk/metastore/scripts/upgrade/derby/upgrade-0.13.0-to-0.14.0.derby.sql Thu Aug
21 20:36:03 2014
@@ -1,3 +1,5 @@
 -- Upgrade MetaStore schema from 0.13.0 to 0.14.0
 
+RUN '019-HIVE-7784.derby.sql';
+
 UPDATE "APP".VERSION SET SCHEMA_VERSION='0.14.0', VERSION_COMMENT='Hive release version 0.14.0'
where VER_ID=1;

Added: hive/trunk/metastore/scripts/upgrade/mssql/002-HIVE-7784.mssql.sql
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/scripts/upgrade/mssql/002-HIVE-7784.mssql.sql?rev=1619569&view=auto
==============================================================================
--- hive/trunk/metastore/scripts/upgrade/mssql/002-HIVE-7784.mssql.sql (added)
+++ hive/trunk/metastore/scripts/upgrade/mssql/002-HIVE-7784.mssql.sql Thu Aug 21 20:36:03
2014
@@ -0,0 +1 @@
+CREATE INDEX PCS_STATS_IDX ON PART_COL_STATS (DB_NAME,TABLE_NAME,COLUMN_NAME,PARTITION_NAME);

Added: hive/trunk/metastore/scripts/upgrade/mssql/upgrade-0.13.0-to-0.14.0.mssql.sql
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/scripts/upgrade/mssql/upgrade-0.13.0-to-0.14.0.mssql.sql?rev=1619569&view=auto
==============================================================================
--- hive/trunk/metastore/scripts/upgrade/mssql/upgrade-0.13.0-to-0.14.0.mssql.sql (added)
+++ hive/trunk/metastore/scripts/upgrade/mssql/upgrade-0.13.0-to-0.14.0.mssql.sql Thu Aug
21 20:36:03 2014
@@ -0,0 +1,6 @@
+SELECT 'Upgrading MetaStore schema from 0.13.0 to 0.14.0' AS MESSAGE;
+
+:r 002-HIVE-7784.mssql.sql;
+
+UPDATE VERSION SET SCHEMA_VERSION='0.14.0', VERSION_COMMENT='Hive release version 0.14.0'
where VER_ID=1;
+SELECT 'Finished upgrading MetaStore schema from 0.13.0 to 0.14.0' AS MESSAGE;

Modified: hive/trunk/metastore/scripts/upgrade/mssql/upgrade.order.mssql
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/scripts/upgrade/mssql/upgrade.order.mssql?rev=1619569&r1=1619568&r2=1619569&view=diff
==============================================================================
--- hive/trunk/metastore/scripts/upgrade/mssql/upgrade.order.mssql (original)
+++ hive/trunk/metastore/scripts/upgrade/mssql/upgrade.order.mssql Thu Aug 21 20:36:03 2014
@@ -1,2 +1,3 @@
 0.11.0-to-0.12.0
 0.12.0-to-0.13.0
+0.13.0-to-0.14.0

Added: hive/trunk/metastore/scripts/upgrade/mysql/019-HIVE-7784.mysql.sql
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/scripts/upgrade/mysql/019-HIVE-7784.mysql.sql?rev=1619569&view=auto
==============================================================================
--- hive/trunk/metastore/scripts/upgrade/mysql/019-HIVE-7784.mysql.sql (added)
+++ hive/trunk/metastore/scripts/upgrade/mysql/019-HIVE-7784.mysql.sql Thu Aug 21 20:36:03
2014
@@ -0,0 +1 @@
+CREATE INDEX PCS_STATS_IDX ON PART_COL_STATS (DB_NAME,TABLE_NAME,COLUMN_NAME,PARTITION_NAME)
USING BTREE;

Modified: hive/trunk/metastore/scripts/upgrade/mysql/hive-schema-0.14.0.mysql.sql
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/scripts/upgrade/mysql/hive-schema-0.14.0.mysql.sql?rev=1619569&r1=1619568&r2=1619569&view=diff
==============================================================================
--- hive/trunk/metastore/scripts/upgrade/mysql/hive-schema-0.14.0.mysql.sql (original)
+++ hive/trunk/metastore/scripts/upgrade/mysql/hive-schema-0.14.0.mysql.sql Thu Aug 21 20:36:03
2014
@@ -704,6 +704,8 @@ CREATE TABLE IF NOT EXISTS `PART_COL_STA
   CONSTRAINT `PART_COL_STATS_FK` FOREIGN KEY (`PART_ID`) REFERENCES `PARTITIONS` (`PART_ID`)
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
+CREATE INDEX PCS_STATS_IDX ON PART_COL_STATS (DB_NAME,TABLE_NAME,COLUMN_NAME,PARTITION_NAME)
USING BTREE;
+
 --
 -- Table structure for table `TYPES`
 --

Modified: hive/trunk/metastore/scripts/upgrade/mysql/upgrade-0.13.0-to-0.14.0.mysql.sql
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/scripts/upgrade/mysql/upgrade-0.13.0-to-0.14.0.mysql.sql?rev=1619569&r1=1619568&r2=1619569&view=diff
==============================================================================
--- hive/trunk/metastore/scripts/upgrade/mysql/upgrade-0.13.0-to-0.14.0.mysql.sql (original)
+++ hive/trunk/metastore/scripts/upgrade/mysql/upgrade-0.13.0-to-0.14.0.mysql.sql Thu Aug
21 20:36:03 2014
@@ -1,4 +1,7 @@
 SELECT 'Upgrading MetaStore schema from 0.13.0 to 0.14.0' AS ' ';
 
+SOURCE 019-HIVE-7784.mysql.sql;
+
 UPDATE VERSION SET SCHEMA_VERSION='0.14.0', VERSION_COMMENT='Hive release version 0.14.0'
where VER_ID=1;
 SELECT 'Finished upgrading MetaStore schema from 0.13.0 to 0.14.0' AS ' ';
+

Added: hive/trunk/metastore/scripts/upgrade/oracle/020-HIVE-7784.oracle.sql
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/scripts/upgrade/oracle/020-HIVE-7784.oracle.sql?rev=1619569&view=auto
==============================================================================
--- hive/trunk/metastore/scripts/upgrade/oracle/020-HIVE-7784.oracle.sql (added)
+++ hive/trunk/metastore/scripts/upgrade/oracle/020-HIVE-7784.oracle.sql Thu Aug 21 20:36:03
2014
@@ -0,0 +1 @@
+CREATE INDEX PCS_STATS_IDX ON PART_COL_STATS (DB_NAME,TABLE_NAME,COLUMN_NAME,PARTITION_NAME);

Modified: hive/trunk/metastore/scripts/upgrade/oracle/hive-schema-0.14.0.oracle.sql
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/scripts/upgrade/oracle/hive-schema-0.14.0.oracle.sql?rev=1619569&r1=1619568&r2=1619569&view=diff
==============================================================================
--- hive/trunk/metastore/scripts/upgrade/oracle/hive-schema-0.14.0.oracle.sql (original)
+++ hive/trunk/metastore/scripts/upgrade/oracle/hive-schema-0.14.0.oracle.sql Thu Aug 21 20:36:03
2014
@@ -527,6 +527,8 @@ ALTER TABLE PART_COL_STATS ADD CONSTRAIN
 
 CREATE INDEX PART_COL_STATS_N49 ON PART_COL_STATS (PART_ID);
 
+CREATE INDEX PCS_STATS_IDX ON PART_COL_STATS (DB_NAME,TABLE_NAME,COLUMN_NAME,PARTITION_NAME);
+
 CREATE TABLE FUNCS (
   FUNC_ID NUMBER NOT NULL,
   CLASS_NAME VARCHAR2(4000),

Modified: hive/trunk/metastore/scripts/upgrade/oracle/upgrade-0.13.0-to-0.14.0.oracle.sql
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/scripts/upgrade/oracle/upgrade-0.13.0-to-0.14.0.oracle.sql?rev=1619569&r1=1619568&r2=1619569&view=diff
==============================================================================
--- hive/trunk/metastore/scripts/upgrade/oracle/upgrade-0.13.0-to-0.14.0.oracle.sql (original)
+++ hive/trunk/metastore/scripts/upgrade/oracle/upgrade-0.13.0-to-0.14.0.oracle.sql Thu Aug
21 20:36:03 2014
@@ -1,4 +1,6 @@
 SELECT 'Upgrading MetaStore schema from 0.13.0 to 0.14.0' AS Status from dual;
 
+@020-HIVE-7784.oracle.sql;
+
 UPDATE VERSION SET SCHEMA_VERSION='0.14.0', VERSION_COMMENT='Hive release version 0.14.0'
where VER_ID=1;
 SELECT 'Finished upgrading MetaStore schema from 0.13.0 to 0.14.0' AS Status from dual;

Added: hive/trunk/metastore/scripts/upgrade/postgres/019-HIVE-7784.postgres.sql
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/scripts/upgrade/postgres/019-HIVE-7784.postgres.sql?rev=1619569&view=auto
==============================================================================
--- hive/trunk/metastore/scripts/upgrade/postgres/019-HIVE-7784.postgres.sql (added)
+++ hive/trunk/metastore/scripts/upgrade/postgres/019-HIVE-7784.postgres.sql Thu Aug 21 20:36:03
2014
@@ -0,0 +1 @@
+CREATE INDEX "PCS_STATS_IDX" ON "PART_COL_STATS" USING btree ("DB_NAME","TABLE_NAME","COLUMN_NAME","PARTITION_NAME");

Modified: hive/trunk/metastore/scripts/upgrade/postgres/hive-schema-0.14.0.postgres.sql
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/scripts/upgrade/postgres/hive-schema-0.14.0.postgres.sql?rev=1619569&r1=1619568&r2=1619569&view=diff
==============================================================================
--- hive/trunk/metastore/scripts/upgrade/postgres/hive-schema-0.14.0.postgres.sql (original)
+++ hive/trunk/metastore/scripts/upgrade/postgres/hive-schema-0.14.0.postgres.sql Thu Aug
21 20:36:03 2014
@@ -1059,6 +1059,13 @@ CREATE INDEX "PART_PRIVS_N49" ON "PART_P
 
 
 --
+-- Name: PCS_STATS_IDX; Type: INDEX; Schema: public; Owner: hiveuser; Tablespace:
+--
+
+CREATE INDEX "PCS_STATS_IDX" ON "PART_COL_STATS" USING btree ("DB_NAME","TABLE_NAME","COLUMN_NAME","PARTITION_NAME");
+
+
+--
 -- Name: ROLE_MAP_N49; Type: INDEX; Schema: public; Owner: hiveuser; Tablespace:
 --
 

Modified: hive/trunk/metastore/scripts/upgrade/postgres/upgrade-0.13.0-to-0.14.0.postgres.sql
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/scripts/upgrade/postgres/upgrade-0.13.0-to-0.14.0.postgres.sql?rev=1619569&r1=1619568&r2=1619569&view=diff
==============================================================================
--- hive/trunk/metastore/scripts/upgrade/postgres/upgrade-0.13.0-to-0.14.0.postgres.sql (original)
+++ hive/trunk/metastore/scripts/upgrade/postgres/upgrade-0.13.0-to-0.14.0.postgres.sql Thu
Aug 21 20:36:03 2014
@@ -1,6 +1,13 @@
 SELECT 'Upgrading MetaStore schema from 0.13.0 to 0.14.0';
 
+\i 019-HIVE-7784.postgres.sql;
+
 UPDATE "VERSION" SET "SCHEMA_VERSION"='0.14.0', "VERSION_COMMENT"='Hive release version 0.14.0'
where "VER_ID"=1;
 SELECT 'Finished upgrading MetaStore schema from 0.13.0 to 0.14.0';
 
 
+--
+-- Name: PCS_STATS_IDX; Type: INDEX; Schema: public; Owner: hiveuser; Tablespace:
+--
+
+



Mime
View raw message