add hive optimization