A
A
Alexander Solovey2017-06-27 11:59:55
MySQL
Alexander Solovey, 2017-06-27 11:59:55

Do I understand MySQL optimization correctly?

I am new to MySQL.
I have a posts table with many fields (more than 20)
If I make an index table with the id_post fields (which points to the post id in posts) and the url field (by which we will search for the post).
Will such a query be optimized, unlike if I directly access a table where there are many fields?
If there are links to sensible materials - write!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Astrohas, 2017-06-27
@Astrohas

If I understand you, then you think that the number of table fields will affect performance. No, because this is a delusion. It is better to create indexes to you for these two fields. And an additional table with exhaustive data is evil against the form of a normal relational one. Suppose you have already found data on your table, but then you need additional fields, what will happen then?

E
entermix, 2017-06-27
@entermix

Read about normal forms

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question