Database Reference
In-Depth Information
As with most data structures, you can delete an index by issuing the DROP
command. The CompactIndexHandler creates an index table in the
database to hold the index values. When the index is dropped, the
underlying index table is also dropped:
DROP INDEX Airport_IDX_1 ON us_airports
Along with indexing, another way to improve query performance is through
partitioning. In the next section, you will see how you can partition tables in
HCatalog.
Creating Partitions
When working with large data stores, you can often improve queries by
partitioning thedata.Forexample,ifqueriesareretrievedusingadatevalue
to restrict the results, a partition on dates will improve performance.
To create a partition on a table, you use the partitioned-by command as part
of the Create Table statement. The following statement creates a table
partitioned by the date column:
Create Table flightData_Partitioned (airline_cd
int,airport_cd string,
delay int,dep_time int) Partitioned By(flight_date
string);
Using the describe command, you can view partition information for the
table, as shown in Figure 7.9 .
 
Search WWH ::




Custom Search