adspace


Explain Clustering in Hive?

Answer Posted / Sangeeta Maurya

Clustering in Hive is a technique used to improve query performance by partitioning data based on one or more columns. Clustered partitions allow the data to be stored contiguously on disk, which reduces the number of times a block needs to be read during a query. Here's an example:

```sql
CREATE TABLE table_name (columns...) PARTITIONED BY (partition_column1 data_type, partition_column2 data_type);
```

Replace `table_name`, `columns`, `partition_column1`, and `partition_column2` with appropriate names.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When we are using queries instead of scripting?

801


When to choose "External Table" in Hive?

867


Where does the data of a Hive table gets stored?

750


How can I delete the above index named index_bonuspay?

807


How to skip header rows from a table in Hive?

907


What are the different types of tables available in Hive?

767


What is the stable version of Hive ?

2695


When to use explode in Hive?

832


What is a Hive variable? What for we use it?

880


Can We Change settings within Hive Session? If Yes, How?

859