Database Reference
In-Depth Information
We will now add an index on the title. However, we want to restrict the length of
this index to reduce the space used by the on-disk index structure. The
Create an
index on 1 columns
option is appropriate. So, we click
Go
. In the next screen, we
specify the index details as shown here:
Here is how to fill in this panel:
•
Index name
: A name we invent
•
Index type
: We can choose INDEX or UNIQUE
•
Field
: We select the field that is used as the index, which is the title field
•
Size
: We enter
30
instead of
100
(the complete length of the field) to
save space in the table's physical portion that holds index data
After saving this panel, we can confirm from the following screenshot that the index
is created and does not cover the entire length of the title field:
Multi-field indexes and index editing
In the next example, we assume that in a future application we will need to find the
topics written by a speciic author in a speciic language. It makes sense to expand
our
author_id
index, adding the
language
field to it.
Search WWH ::
Custom Search