What is indexing in mysql and how do we create indexing in
mysql
Answer Posted / ramesh n
Indexes are created on a per column basis. If you have a
table with the columns: name, age, birthday and employeeID
and want to create an index to speed up how long it takes to
find employeeID values in your queries, then you would need
to create an index for employeeID. When you create this
index, MySQL will build a lookup index where employeeID
specific queries can be run quickly. However, the name, age
and birthday queries would not be any faster.
Indexes are something extra that you can enable on your
MySQL tables to increase performance,cbut they do have some
downsides. When you create a new index MySQL builds a
separate block of information that needs to be updated every
time there are changes made to the table. This means that if
you are constantly updating, inserting and removing entries
in your table this could have a negative impact on performance.
syntax
CREATE TABLE <table name> (
<filed name> <field type>....
)
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What is the use of super-global arrays in php?
What is the use of token in php?
What is overloading in php?
Explain how does one prevent the following warning ‘warning: cannot modify header information – headers already sent' and why does it occur in the first place?
Does php need to be installed?
What is the use of explode() function?
How to delete file in php?
What are php variables?
How would you declare a function that receives one parameter name hello?
Which array function checks if the particular key exists in the array?
Write a php function to convert all null values to blank?
What is the use of mysql_fetch_assoc in php?
How to access standard error stream in PHP?
When to use get and post request?
Which Scripting Engine PHP uses?