SHOW object Examples | Teradata Vantage - Example: SHOW HASH INDEX - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
Published
September 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
wgr1555383704548.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1144
lifecycle
previous
Product Category
Teradata Vantage™

This example uses the following CREATE HASH INDEX statement to create ord_cust_hidx:

     CREATE HASH INDEX ord_cust_hidx
     (o_date) ON orders
     BY (o_date)
     
     ORDER BY VALUES;
The SHOW HASH INDEX report differs from the text of the CREATE HASH INDEX DDL as follows:
  • All names are qualified
  • Fallback protection and checksum options display
  • Map assignment

When you do not specify a BY or ORDER clause in the CREATE HASH INDEX DDL, the default values for those clauses are not reported.

SHOW HASH INDEX ord_cust_hidx;
 *** Text of DDL statement returned. 
 *** Total elapsed time was 1 second.
     ------------------------------------------------------------
CREATE HASH INDEX YourDB.ord_cust_hidx ,NO FALLBACK ,CHECKSUM = DEFAULT, 
MAP = TD_MAP1
(o_date )
 ON YourDB.orders 
 BY (o_date )
 ORDER BY VALUES
;