Tell me how to properly and whether to create an index for the tables?
- It all depends on the problem / problem to be solved. Can you describe the situation in more detail? - null
- There is no single answer and cannot be, indexing speeds up the selection but slows down updating and adding new records ... - Zowie
- in most practical tasks, the sampling rate is more important than the rate of change (it is usually performed on single records) - renegator
- onedo not tell, DB are different ... - Zowie
- oneI can recommend a great book, Refactoring SQL Applications . You will learn a lot of useful performance (including indexes). - Nofate ♦
|
1 answer
Usually, indexes are created to speed up the selection from the table. Most often, the field of the table that is being sampled is indexed.
How to create an index in mysql can be fed here .
(Do not forget that indexes increase the time of inserts and updates)
- Pasib, what you need =) - Gorets
|