Mitigating backend database slowness

Address backend slowness by disabling privilege synchronization and truncating large tables.

Condition

The backend database experiences slowness when processing TBL_COL_PRIVS and TBL_PRIVS tables, leading to delayed query execution.

Cause

The TBL_COL_PRIVS and TBL_PRIVS tables grow large over time, causing performance degradation in the backend database.

Remedy

  1. Go to Hive on Tez > Configuration > > HiveServer2 Advanced Configuration Snippet (Safety Valve) for hive-site.xml
    Disable privilege synchronization by adding the following property:
    <property>
    <name>hive.privilege.synchronizer</name>
    <value>false</value>
    </property>
    
  2. Restart the Hive on Tez service.
  3. Perform the following steps:
    1. Stop the Hive on Tez and Hive services.
    2. Backup and truncate the TBL_PRIVS and TBL_COL_PRIVS tables
    3. Restart the Hive on Tez services to ensure the changes take effect.