Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-27965

Table/partition rename takes a long time at PART_COL_STATS for wide tables

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 4.0.0
    • None
    • None
    • None

    Description

      Partition table rename gets clogged at PART_COL_STATS for wide tables.

      CREATE TABLE IF NOT EXISTS `PART_COL_STATS` (
       ...
       `DB_NAME` varchar(128) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
       `TABLE_NAME` varchar(128) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
       `PARTITION_NAME` varchar(767) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL, 
        ...)

      Since PART_COL_STATS holds db_name & table_name, incase of table rename, every row in PART_COL_STATS associated with the table should be fetched, stored in memory, delete & re-insert with new db/table/partition name.

       

      Remove DB_NAME, TABLE_NAME, PARTITION_NAME from PART_COL_STATS, instead use TBL_ID, DB_ID, PART_ID to avoid touching PART_COL_STATS for table/partition renames.

      Also TBL_ID, DB_ID, PART_ID can be used for PART_COL_STATS INDEXING.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              nareshpr Naresh P R
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: