Professional Documents
Culture Documents
Contents
Introduction
Index Types of index
Some kinds of indexes in PostGreSQL
NGUYEN HongPhuong B-Tree Data structure
Email: phuongnh@soict.hust.edu.vn INDEX in SQL
Site: http://is.hust.edu.vn/~phuongnh
Which cases should not we use index?
Face: https://www.facebook.com/phuongnhbk
Hanoi University of Science and Technology
1 2
Introduction Introduction
The technical purpose of the database An index is a separate data structure
index is to limit as much as possible managed by the database, which can
disk IO while executing a query. be used while executing a query, in
Users can not see the indexes, they are order to avoid reading the entire data
just used to speed up searches/queries for a query that only requires a small
Updating a table with indexes takes part of it.
more time than a table without indexes Different implementations of an index
So, only create indexes on columns will improve query performance for
that will be frequently searched against different type of operators.
3 4
1
10/11/2019
5 6
2
10/11/2019
11 12
3
10/11/2019
13 14
Small tables
Tables are often updated and inserted
Not be applied on columns which have
a large number of NULL value.
Not be applied on columns which are
often updated.
15 16