Saminnet-Search Article Wiki Forum Piwigo SNS Cloud vtiger Sugar
DB2 Indexes

  • Data-Articles
    • Labuanbajo2 (67) Sat09,12:10pm

      Hari pertamaSailingKomodo, kapal kami menuju ke pulau Kanawa. Bukan Kenawa yang di Sumba itu, ya. Karena biasanya sering tertukar. Pulau Kanawa sendiri sebuah pulau kecil yang memiliki dermaga dan sebuah resort. Kalian bisa menginap di resort ini dengan fasilitas antar jemput dari pelabuhan Labuan Bajo-Kanawa. Bisa dilihat paketnya di situs-situs penjualan reservasi hotel. Kami akan mampir untuksn

      Read More...

DB2 Indexes

This chapter covers introduction to indexes, their types, creation and dropping.

Introduction

Index is a set of pointers, which can refer to rows in a table, blocks in MDC or ITC tables, XML data in an XML storage object that are logically ordered by the values of one or more keys. It is created on DB2 table columns to speed up the data access for the queries, and to cluster and partition the data efficiently. It can also improve the performance of operation on the view. A table with a unique index can have rows with unique keys. Depending on the table requirements, you can take different types of indexes.

Types of indexes

  • http://www.tutorialspoint.com/images/icon-bullet.png) 0px 4px no-repeat;">Unique and Non-Unique indexes
  • http://www.tutorialspoint.com/images/icon-bullet.png) 0px 4px no-repeat;">Clustered and non-clustered indexes

Creating indexes

For creating unique indexes, you use following syntax:

Syntax:

db2 create unique index <index_name> on 
<table_name>(<unique_column>) include (<column_names..>)

Example: To create index for 窶徭hopper.sales1窶 table.

db2 create unique index sales1_indx on 
shopper.sales1(id) include (itemname)

Dropping indexes

For dropping the index, you use the following syntax:

Syntax:

db2 drop unique index <index_name> on 
<table_name>(<unique_column>) include (<column_names..>)

Example:

db2 drop index sales_index 

Comments   

 
0 #1 Guest 2020-01-05 23:06
ahkhdm

Feel free to surf to my web site - fijmfc (rankxl.pl)
Quote
 

Category Database

TweetTweet Share on LinkedInShare on LinkedIn Share on Google+Google+ Submit to RedditReddit Publish on WordPress WordPress Send emailSend email