Database Indexing and Tuning
Database Indexing and Tuning
Computer Memory
Secondary
Primary Storage Tertiary Storage
Storage
1. Primary Storage
This operates directly in the computer’s Central
Processing Unit.
Eg: Main Memory, Cache Memory.
• Provides fast access to data.
• Limited storage capacity.
• Contents of primary storage will be deleted when the
computer shuts down or in case of a power failure.
• Comparatively more expensive.
1
© e-Learning Centre, UCSC
0
3.1 Disk Storage and Basic File Structures
3.1.1. Computer Memory Hierarchy
2. Secondary Storage
Operates external to the computer’s main memory.
Eg: Magnetic Disks, Flash Drives, CD-ROM
• The CPU cannot process data in secondary storage
directly. It must first be copied into primary storage
before the CPU can handle it.
• Mostly used for online storage of enterprise
databases.
• With regards to enterprise databases, the magnetic
disks have been used as the main storage medium.
• Recently there is a trend to use flash memory for the
purpose of storing moderate amounts of permanent
data.
• Solid State Drive (SSD) is a form of memory that can
be used instead of a disk drive.
1
© e-Learning Centre, UCSC
1
3.1 Disk Storage and Basic File Structures
2. Secondary Storage
• Least expensive type of storage media.
• The storage capacity is measured in:
- kilobytes(kB)
- Megabytes(MB)
- Gigabytes(GB)
- Terabytes(TB)
- Petabytes (PB)
1
© e-Learning Centre, UCSC
2
3.1 Disk Storage and Basic File Structures
3. Tertiary Storage
Operates external to the computer’s main memory.
Eg: CD - ROMs, DVDs
• The CPU cannot process data in tertiary storage
directly. It must first be copied into primary storage
before the CPU can handle it.
• Removable media that can be used as offline storage
falls in this category.
• Large capacity to store data.
• Comparatively less cost.
• Slower access to data than primary storage media.
1
© e-Learning Centre, UCSC
3
3.1 Disk Storage and Basic File Structures
4. Flash Memory
• Popular type of memory with its non-volatility.
• Use the technique of EEPROM (Electronically
Erasable and Programmable Read Only Memory)
• High performance memory.
• Fast access.
• One disadvantage is that the entire block must be
erased and written simultaneously.
• Two Types:
- NAND Flash Memory
- NOR Flash Memory
• Common examples:
- Devices in Cameras, MP3/MP4 Players,
Cellphones, USB Flash Drives
1
© e-Learning Centre, UCSC
4
3.1 Disk Storage and Basic File Structures
5. Optical Drives
• Most popular type of Optical Drives are CDs and DVDs.
• Capacity of a CD is 700-MB and DVDs have capacities
ranging from 4.5 to 15 GB.
• CD - ROM reads the data by laser technology. They
cannot be overwritten.
• CD-R(compact disk recordable) and DVD-R: Allows to
store data which can be read as many times as
required.
• Currently this type of storage is comparatively declining
due to the popularity of the magnetic disks.
1
© e-Learning Centre, UCSC
5
3.1 Disk Storage and Basic File Structures
6. Magnetic Tapes
• Used for archiving and as a backup storage of data.
• Note that Magnetic Disks (400 GB–8TB) and Magnetic
Tapes (2.5TB–8.5TB) are two different storage types.
1
© e-Learning Centre, UCSC
6
Activity
1
© e-Learning Centre, UCSC
7
3.1 Disk Storage and Basic File Structures
3.1.2. Storage Organization of Databases
• Usually databases have Persistent data. This means
large volumes of data stored over long periods of
time.
• These persistent data are continuously retrieved and
processed in the storage period.
• The place where the databases are stored
permanently in the computer memory is the
secondary storage.
• Magnetic disks are widely used here since:
- If the database is too large, it will not fit in the
main memory.
- Secondary storage is non-volatile, but the
main memory is volatile.
- The cost of storage per unit of data is lesser in
secondary storage.
1
© e-Learning Centre, UCSC
8
3.1 Disk Storage and Basic File Structures
1
© e-Learning Centre, UCSC
9
3.1 Disk Storage and Basic File Structures
2
© e-Learning Centre, UCSC
0
3.1 Disk Storage and Basic File Structures
2
© e-Learning Centre, UCSC
1
3.1 Disk Storage and Basic File Structures
3.1.2. Storage Organization of Databases
2
© e-Learning Centre, UCSC
3
3.1 Disk Storage and Basic File Structures
3.1.3. Secondary Storage Media
2
© e-Learning Centre, UCSC
5
3.1 Disk Storage and Basic File Structures
3.1.3. Secondary Storage Media
Hardware components
on disk:
a) A single-sided disk
with read/write
hardware.
2
© e-Learning Centre, UCSC
6
3.1 Disk Storage and Basic File Structures
2
© e-Learning Centre, UCSC
7
3.1 Disk Storage and Basic File Structures
2
© e-Learning Centre, UCSC
9
Activity
3
© e-Learning Centre, UCSC
0
3.1 Disk Storage and Basic File Structures
3
© e-Learning Centre, UCSC
1
3.1 Disk Storage and Basic File Structures
3
© e-Learning Centre, UCSC
3
3.1 Disk Storage and Basic File Structures
Field
Employee Relation
Value
Record
© e-Learning Centre, UCSC
3.1 Disk Storage and Basic File Structures
3.1.5. Placing File Records on Disk
3
© e-Learning Centre, UCSC
5
3.1 Disk Storage and Basic File Structures
3
© e-Learning Centre, UCSC
6
Activity
Select the Data Type that best matches the description out of
the following.
[Integer, Floating Point, Date and Time, Boolean, Character]
3
© e-Learning Centre, UCSC
7
3.1 Disk Storage and Basic File Structures
3
© e-Learning Centre, UCSC
9
3.1 Disk Storage and Basic File Structures
4
© e-Learning Centre, UCSC
0
3.1 Disk Storage and Basic File Structures
4
© e-Learning Centre, UCSC
1
3.1 Disk Storage and Basic File Structures
4
© e-Learning Centre, UCSC
2
3.1 Disk Storage and Basic File Structures
4
© e-Learning Centre, UCSC
3
3.1 Disk Storage and Basic File Structures
4
© e-Learning Centre, UCSC
4
Activity
Fill in the blanks in the following statements.
1. A file where the sizes of records in it are different in size
is called a _______________.
bfr = B / R
Block Size = B bytes
Record Size = R bytes 4
© e-Learning Centre, UCSC
6
3.1 Disk Storage and Basic File Structures
4
© e-Learning Centre, UCSC
8
3.1 Disk Storage and Basic File Structures
4
© e-Learning Centre, UCSC
9
3.1 Disk Storage and Basic File Structures
b = r / bfr
5
© e-Learning Centre, UCSC
0
3.1 Disk Storage and Basic File Structures
Example of Calculation
There is a disk with block size B=256 bytes. A file has
r=50,000 STUDENT records of fixed-length. Each
record has the following fields:
NAME (55 bytes), STDID (4 bytes),
DEGREE(2 bytes), PHONE(10 bytes),
SEX (1 byte).
5
© e-Learning Centre, UCSC
3
3.1 Disk Storage and Basic File Structures
3.1.5. Placing File Records on Disk
Operations on
Files
Retrieval Update
Operations Operations
5
© e-Learning Centre, UCSC
7
3.1 Disk Storage and Basic File Structures
5
© e-Learning Centre, UCSC
8
3.1 Disk Storage and Basic File Structures
3.1.6. File Operation
Operation Description
Open Allows to read or write to a file. Sets the file
pointer to the file's beginning.
Reset Sets the file pointer of an open file to the
beginning of the file.
Find (Locate) The first record that meets a search
criterion is found. The block holding that
record is transferred to a main memory
buffer. The file pointer is set to the buffer
record, which becomes the current record.
5
© e-Learning Centre, UCSC
9
3.1 Disk Storage and Basic File Structures
3.1.6. File Operations
Operation Description
Read (Get) Copies the current record from the buffer to
a user-defined program variable. The
current record pointer may also be
advanced to the next record in the file using
this command.
FindNext Searches the file for the next entry that
meets the search criteria. The block holding
that record is transferred to a main memory
buffer.
Delete The current record is deleted, and the file
on disk is updated to reflect the deletion.
6
© e-Learning Centre, UCSC
0
3.1 Disk Storage and Basic File Structures
Operation Description
Modify Modifies some field values for the current
record and the file on disk is updated to
reflect the modification.
Operation Description
Scan Scan returns the initial record if the file
has just been opened or reset;
otherwise, it returns the next record.
6
© e-Learning Centre, UCSC
2
3.1 Disk Storage and Basic File Structures
Operation Description
FindAll Locates all the records in the file that
satisfy a search condition.
FindOrdered Locates all the records in the file in a
specified order condition.
Reorganize Starts the reorganization process. (In
cases such as ordering the records)
6
© e-Learning Centre, UCSC
3
3.1 Disk Storage and Basic File Structures
6
© e-Learning Centre, UCSC
4
3.1 Disk Storage and Basic File Structures
6
© e-Learning Centre, UCSC
5
Activity
6
© e-Learning Centre, UCSC
8
3.1 Disk Storage and Basic File Structures
• Deleting a Record.
• A program must first locate its block, copy the block
into a buffer, remove the record from the buffer, and
then rewrite the block back to the disk to delete a
record.
• This method of deleting a large number of data
results in waste of storage space.
6
© e-Learning Centre, UCSC
9
3.1 Disk Storage and Basic File Structures
7
© e-Learning Centre, UCSC
0
3.1 Disk Storage and Basic File Structures
• Modifying a Record.
• Because the updated record may not fit in its
former space on disk, modifying a variable-length
record may require removing the old record and
inserting the modified record.
7
© e-Learning Centre, UCSC
1
3.1 Disk Storage and Basic File Structures
• Reading a Record.
• A sorted copy of the file is produced to read all
entries in order of the values of some field.
Because sorting a huge disk file is a costly task,
specific approaches for external sorting are
employed.
7
© e-Learning Centre, UCSC
2
3.1 Disk Storage and Basic File Structures
7
© e-Learning Centre, UCSC
3
3.1 Disk Storage and Basic File Structures
• Internal Hashing.
When it comes to internal files, hashing is usually
done with a Hash Table and an array of records.
• Method 1 for Internal Hashing
• If the array index range is 0 to m – 1, there are m slots
with addresses that correspond to the array indexes.
• Then a hash function is selected that converts the
value of the hash field into an integer between 0 and
m-1.
• The record address is then calculated using the given
function.
• h(K) = Hash Function of K Value
• K = Field Value h(K) = K Mod m
7
© e-Learning Centre, UCSC
7
3.1 Disk Storage and Basic File Structures
temp ← 1;
for i ← 1 to 20 do temp ← temp * code(K[i ] ) mod M ;
hash_address ← temp mod M;
8
© e-Learning Centre, UCSC
0
3.1 Disk Storage and Basic File Structures
8
© e-Learning Centre, UCSC
1
3.1 Disk Storage and Basic File Structures
3.1.8. Hashing techniques for storing database
records: Internal hashing, external hashing
• Internal Hashing.
• Methods of Collision Resolution
• Open Addressing - The program scans the
subsequent locations in order until an unused
(empty) position is discovered, starting with the
occupied position indicated by the hash address.
• Chaining - Changing the pointer of the occupied
hash address location to the address of the new
record in an unused overflow location and putting
the new record in an unused overflow location.
• Multiple Hashing - If the first hash function fails,
the program uses a second hash function. If a new
collision occurs, the program will utilize open
addressing or a third hash function, followed by
open addressing if required.
8
© e-Learning Centre, UCSC
2
3.1 Disk Storage and Basic File Structures
3.1.8. Hashing techniques for storing database
records: Internal hashing, external hashing
• External Hashing.
• Hashing for disk files is named as External
Hashing.
• The target address space is built up of Buckets,
each of which stores many records, to match the
properties of disk storage.
• A bucket is a continuous group of disk blocks or a
single disk block.
• Rather than allocating an absolute block address to
the bucket, the hashing function translates a key to a
relative bucket number.
• The bucket number is converted into the matching
disk block address via a table in the file header.
8
© e-Learning Centre, UCSC
3
3.1 Disk Storage and Basic File Structures
3.1.8. Hashing techniques for storing database records:
Internal hashing, external hashing
• External Hashing.
The following diagram shows matching bucket
numbers (0 to M -1) to disk block addresses.
8
© e-Learning Centre, UCSC
4
3.1 Disk Storage and Basic File Structures
3.1.8. Hashing techniques for storing database
records: Internal hashing, external hashing
• External Hashing.
• Since many records will fit in a bucket can hash to
the same bucket without generating issues, the
collision problem is less severe with buckets.
• When a bucket is full to capacity and a new record is
entered, a variant of chaining can be used in which a
pointer to a linked list of overflow records for the
bucket is stored in each bucket.
• Here, the linked list pointers should be Record
Pointers, which comprise a block address as well
as a relative record position inside the block.
8
© e-Learning Centre, UCSC
5
3.1 Disk Storage and Basic File Structures
3.1.8. Hashing techniques for storing database records:
Internal hashing, external hashing
• External Hashing.
Handling overflow for buckets by chaining
8
© e-Learning Centre, UCSC
6
Activity
Match the description with the correct term.
8
© e-Learning Centre, UCSC
7
3.2 Introduction to indexing
8
© e-Learning Centre, UCSC
8
3.2 Introduction to indexing
8
© e-Learning Centre, UCSC
9
3.3 Types of Indexes
9
© e-Learning Centre, UCSC
1
3.3 Types of Indexes
9
© e-Learning Centre, UCSC
2
3.3 Types of Indexes
9
© e-Learning Centre, UCSC
3
3.3 Types of Indexes
9
© e-Learning Centre, UCSC
4
3.3 Types of Indexes
The image given in the next slide illustrates the index file and
respective block pointers to the data file.
9
© e-Learning Centre, UCSC
5
3.3 Types of Indexes
9
© e-Learning Centre, UCSC
6
3.3 Types of Indexes
9
© e-Learning Centre, UCSC
7
3.3 Types of Indexes
9
© e-Learning Centre, UCSC
8
3.3 Types of Indexes
9
© e-Learning Centre, UCSC
9
3.3 Types of Indexes
1
© e-Learning Centre, UCSC 0
3.3 Types of Indexes
1
© e-Learning Centre, UCSC 0
3.3 Types of Indexes
1
© e-Learning Centre, UCSC 0
3.3 Types of Indexes
1
© e-Learning Centre, UCSC 0
3.3 Types of Indexes
1
© e-Learning Centre, UCSC 0
3.3 Types of Indexes
1
© e-Learning Centre, UCSC 0
3.3 Types of Indexes
1
© e-Learning Centre, UCSC 0
3.3 Types of Indexes
Clustering Index
1
© e-Learning Centre, UCSC 1
3.3 Types of Indexes
Clustering Index with allocation of
blocks for distinct values in the
ordered key field.
1
© e-Learning Centre, UCSC 1
3.3 Types of Indexes
• Single Level Indexes: Clustering indexes
Ex: For the same ordered file with r = 300,000, B = 4,096
bytes, let’s say we have used a field “Zip code“ which is non
key field, to order the data file.
Assumption: Each Zip Code has equal number of records and
there are 1000 distinct values for Zip Codes (ri). Index entries
consist of 5-byte long Zip Code and 6-byte long block pointer.
Size of the record Ri = 5+6 = 11 bytes
Blocking factor bfri = B/Ri = floor(4,096/11)
= 372 index entries per
block
Hence, number of blocks needed bi = Ri/bfri
= ceiling(1,000/372) = 3 blocks.
Block accesses to perform a binary search,
= log2 (bi) = ceiling(log2 (3))= 2
1
© e-Learning Centre, UCSC 1
3.3 Types of Indexes
1
© e-Learning Centre, UCSC 1
3.3 Types of Indexes
1
© e-Learning Centre, UCSC 1
3.3 Types of Indexes
1
© e-Learning Centre, UCSC 1
3.3 Types of Indexes
1
© e-Learning Centre, UCSC 2
3.3 Types of Indexes
1
© e-Learning Centre, UCSC 2
3.3.2 Multilevel indexes: Overview of multilevel
indexes
1
© e-Learning Centre, UCSC 2
3.3.2 Multilevel indexes: Overview of multilevel
indexes
• If the first level index has r1 entries, blocking factor for the
first level bfr1 = fo.
• The number of blocks required for the first level is given
by, ( r1 / fo).
• Therefore, the number of records in the second level
index r2= ( r1 / fo).
• Similarly, r3= ( r2 / fo).
• However, we need to have second level only if the first
level requires more than 1 block. Likewise, we consider for
a next level only if the current level requires more than 1
block.
• If the top level is t,
t= ⎡ (logfo (r1)) ⎤ 1
© e-Learning Centre, UCSC 2
3.4 Indexes on Multiple Keys
1
© e-Learning Centre, UCSC 2
3.4 Indexes on Multiple Keys
1
© e-Learning Centre, UCSC 2
3.4 Indexes on Multiple Keys
• All of the mentioned methods will eventually give the
same set of records as the result.
• However, the number of individual records which meet
one of the specified conditions (either department_id= 1
or gpa= 3.5) are larger than the records that satisfy both
conditions (department_id= 1 and gpa= 3.5).
• Hence, none of the above three methods is efficient for
searching records we required.
• Having a multiple key index on department_id and gpa
would be more efficient in this case, because we can
search for the records which meets given requirements
just by accessing the index file.
• We refer to keys containing multiple attributes as
composite keys.
1
© e-Learning Centre, UCSC 2
3.4 Indexes on Multiple Keys
• Ordered Index on Multiple Attributes
• We can create a key field for previously discussed
file as <department_id,gpa>.
• Search key is also a pair of values. For the previous
example this will be <1,3.5>
• In general, if an index is created on attributes
<A1,A2,A3 …. ,An>, the search key values are tuples
with n values ; <v1,v2,v3 …. ,vn>.
• A lexicographic (alphabetical) ordering of these tuple
values establishes an order on this composite
search keys.
• For example, all the composite keys with 1 for
department_id will precede those for department_id
2.
• When the department_id is the same, the composite
keys will be sorted in ascending order of the gpa. 1
© e-Learning Centre, UCSC 2
3.4 Indexes on Multiple Keys
• Partitioned Hashing
• Partitioned hashing is an extension of static external
hashing (when a search-key value is provided, the
hash function always computes the same address)
which allows access on multiple keys.
• This is suitable only for equality comparisons. It
doesn’t support range queries.
• For a key consisting n attributes, n separate hash
addresses are generated. The bucket address is a
concatenation of these n addresses.
• Then it is possible to search for composite key by
looking up the appropriate buckets that match the
parts of the address in which we are interested.
1
© e-Learning Centre, UCSC 2
3.4 Indexes on Multiple Keys
• Partitioned Hashing
• For example, consider the composite search key
<department_id,gpa>
• If department_id and gpa are hashed into 2-bit and
6-bit address respectively, we get an 8 bit bucket
address.
• If department_id = 1 hashed to 01 and gpa = 3.5
hashed to 100011 then the bucket address is
01100011.
• To search for students with 3.5 gpa, we can search
for buckets 00100011 , 01100011, 10100011,
11100011
1
© e-Learning Centre, UCSC 3
3.4 Indexes on Multiple Keys
• Partitioned Hashing
• Advantages of partitioned hashing:
i. Ease of extending for any number of attributes.
ii. Ability to design the bucket addresses in a way
that frequently accessed attributes get higher-
order bits in the address. (Higher-order bits are
the left most bits)
iii. There is no need to maintain a separate access
structure for individual attributes.
1
© e-Learning Centre, UCSC 3
3.4 Indexes on Multiple Keys
• Partitioned Hashing
• Disadvantages of partitioned hashing:
i. Inability to handle range queries on any of the
component attributes.
ii. Most of the time, records are not maintained by
the order of the key which was used for the hash
function. Hence, using lexicographic order of
combination of attributes as a key (eg:
<department_id,gpa>) to access the records
would not be straightforward or efficient.
1
© e-Learning Centre, UCSC 3
3.4 Indexes on Multiple Keys
• Grid Files
• Constructed using a grid array with one linear
scale (or dimension) for each of the search
attributes.
• For the previous example of students file, we can
construct a linear scale for department_id and
another for gpa.
• These linear scales are created to preserve the
uniform distribution of that particular attributes that
are considered as index.
• Each cell points to some bucket address where
the records corresponding to that cell are stored.
1
© e-Learning Centre, UCSC 3
3.4 Indexes on Multiple Keys
Following illustration shows a grid array for the Student file with
one linear scale for department_id and another for the gpa
attribute Student File
0 1 2 3
department_id Linear scale gpa Linear scale
0 0 < 0.9 0
1 1 1.0 - 1.9 1
2 2 2.0 - 2.9 2
3 3 > 3.0 3
Linear scale for department_id Linear scale for gpa 1
© e-Learning Centre, UCSC 3
3.4 Indexes on Multiple Keys
• Grid Files
• When we query for deparment_id = 1 and gpa =3.5, it
maps to cell (1,3) as highlighted in the previous slide.
• Records for this combination can be found in the
corresponding bucket.
• Due to nature of this indexing, we can perform range
queries.
• As an example, for range query gpa > 2.0 and
department_id < 2 , following bucket pool can be
selected.
3
0
1
3
© e-Learning Centre, UCSC
0 1 2 3
3.4 Indexes on Multiple Keys
• Grid Files
• Grid files can be applied to any number of search
keys.
• If we have n number of search keys, we’ll get a grid
array of n dimensions.
• Hence it is possible to partition the file along the
dimensions of the search key attributes.
• Thus, grid files provide an access by combinations of
values along dimensions of grid array.
• Space overhead and additional maintenance cost for
reorganization of the dynamic files are some
drawbacks of grid files.
1
© e-Learning Centre, UCSC 3
3.5 Other types of Indexes
• Hash Indexes
• The hash index is a secondary structure that allows
access to the file using hashing.
• The search key is defined on an attribute except the
one used for organizing the primary data file.
• Index entries consist of the hashed key and the
pointer to the record which is corresponding to the
key.
• The index files with hash index could be arranged as
dynamically expandable hash file.
1
© e-Learning Centre, UCSC 3
3.5 Other types of Indexes
• Hash Indexes
Hash-based indexing.
1
© e-Learning Centre, UCSC 3
3.5 Other types of Indexes
• Bitmap Indexes
1
© e-Learning Centre, UCSC 3
3.5 Other types of Indexes
• Bitmap Indexes
1
© e-Learning Centre, UCSC 4
3.5 Other types of Indexes
0 51024 Sandun M 1 0
• In the given table we 1 23402 Kamalani F 0 1
have a column for
2 62104 Eranda M 1 0
record the gender of
the employee. 3 34723 Christina F 0 1
• The bitmap index for 4 81165 Clera F 0 1
the values are an
5 13646 Mohamad M 1 0
array of bits as
shown. 6 54649 Karuna M 1 0
7 41301 Padma F 0 1
M 10100110
F 01011001
1
4
© e-Learning Centre, UCSC
1
3.5 Other types of Indexes
• Bitmap Indexes
• According to the example given in the previous slide,
• If we consider value F in column gender, 1st, 3rd,
4th and 7th bits are marked as “1” because record
ids of 1,3,4, and 7 have value F init. But the record
ids of 0,2,5 and 6 set to “0”.
• Bitmap index is created on a set of records which
are numbered from 0 to n with a record id or row id
that can be mapped to a physical address.
• This physical address is created with block number
and record offset within the block.
1
© e-Learning Centre, UCSC 4
3.5 Other types of Indexes
1
© e-Learning Centre, UCSC 4
3.6 Index Creation and Tuning
• Index Creation
• An index is not an essential part of a data file.
However, we can create and remove index
dynamically.
• Usually, index is known as access structures. We
can create index based on the frequently used
search requirements.
• The physical ordering of the data file is disregarded
by creating a secondary index.
• Secondary index can be created in conjunction with
virtually any primary record organization.
• Secondary index can be used in addition to the
primary index such as ordering, hashing or mixed
files.
1
© e-Learning Centre, UCSC 4
3.6 Index Creation and Tuning
• Index Creation
• Following command is a general way of creating an
index in RDBMS;
CREATE [ UNIQUE ] INDEX <index name>
ON <table name> ( <column name> [ <order> ] { ,
<column name> [ <order> ] } )
[ CLUSTER ] ;
• Keywords in green square brackets are optional.
• [Cluster] → sort records in the datafile on the
indexing attribute.
• <order> → ASC/DESC (default- ASC)
1
© e-Learning Centre, UCSC 4
3.6 Index Creation and Tuning
• Tuning Indexes
• The indexes that we have created, may require
modifications due to following reasons,
i. Long run time of the queries due to deficiency
of an index.
ii. Index may not get utilized.
iii. Attributes that are used to create the index
might subject to frequent changes.
• DBMS provide options to view the execution order
of the queries. The indexes used, number of disk
accesses are include in this view and it is known as
query plan.
• With the query plan, we can identify if the above
problems are taking place and hence update or
remove index accordingly.
1
© e-Learning Centre, UCSC 4
3.6 Index Creation and Tuning
• Tuning Indexes
1
© e-Learning Centre, UCSC 4
3.7 Physical Database Design in Relational
Databases
1
© e-Learning Centre, UCSC 4
3.7 Physical Database Design in Relational
Databases
1
© e-Learning Centre, UCSC 5
3.7 Physical Database Design in Relational
Databases
1
© e-Learning Centre, UCSC 5
3.7 Physical Database Design in Relational
Databases
1
© e-Learning Centre, UCSC 5
3.7 Physical Database Design in Relational
Databases
1
© e-Learning Centre, UCSC 5
3.7 Physical Database Design in Relational
Databases
1
© e-Learning Centre, UCSC 5
3.7 Physical Database Design in Relational
Databases
1
© e-Learning Centre, UCSC 5
3.7 Physical Database Design in Relational
Databases
1
© e-Learning Centre, UCSC 5
3.7 Physical Database Design in Relational
Databases
1
© e-Learning Centre, UCSC 5
3.7 Physical Database Design in Relational
Databases
1
© e-Learning Centre, UCSC 5
Activity
1
© e-Learning Centre, UCSC 5
Activity
1
© e-Learning Centre, UCSC 6
Activity
1
© e-Learning Centre, UCSC 6
Activity
1
© e-Learning Centre, UCSC 6
Activity
1
© e-Learning Centre, UCSC 6
Activity
1
© e-Learning Centre, UCSC 6
Activity
1
© e-Learning Centre, UCSC 6
Activity
1
© e-Learning Centre, UCSC 6
Activity
1
© e-Learning Centre, UCSC 6
Activity
1
© e-Learning Centre, UCSC 6