What is indexing in mysql and how do we create indexing in
mysql

Answer Posted / ramya

Two type of indexing
Spatial indexes (created using SPATIAL INDEX):
1.Available only for MyISAM tables. Specifying a
SPATIAL INDEX for other storage engines results in an error.
2.Indexed columns must be NOT NULL.
3.In MySQL 5.0, the full width of each column is
indexed by default, but column prefix lengths are allowed.
However, as of MySQL 5.0.40, the length is not displayed in
SHOW CREATE TABLE output. mysqldump uses that statement. As
of that version, if a table with SPATIAL indexes containing
prefixed columns is dumped and reloaded, the index is
created with no prefixes. (The full column width of each
column is indexed.)

Nonspatial indexes (created with INDEX, UNIQUE, or PRIMARY KEY):
1.Allowed for any storage engine that supports spatial
columns except ARCHIVE.
2.Columns can be NULL unless the index is a primary key.
3.For each spatial column in a non-SPATIAL index except
POINT columns, a column prefix length must be specified.
(This is the same requirement as for indexed BLOB columns.)
The prefix length is given in bytes.
4.The index type for a non-SPATIAL index depends on the
storage engine. Currently, B-tree is used.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the two most common ways to start and finish a php block of code?

624


How do you end php?

508


Write down the code for save an uploaded file using php?

450


What are major variables in research?

535


Does apache use php?

538






Which is better php praogramming or cad/cam scope wise and also salaray wise?

1574


How to list all values of submitted fields?

545


Whether it is possible to share a single instance of a memcache between multiple php projects?

530


How does php and apache work?

530


Write a program to get lcm of two numbers using php?

506


What is the w3c?

8547


What does $this do in php?

524


What is overloading in php?

548


Are php sessions secure?

529


What is php session and how it works?

524