O
O
Optimus2016-09-27 11:25:42
MySQL
Optimus, 2016-09-27 11:25:42

Many compound indexes or one for many fields?

A flexible search is made as in electronics stores by parameters.
There is a field A along with it, other fields will often be requested A + B sometimes up to 5 fields A + B + C + D + E sometimes A + F + G now there are several composite indexes like A + B or A + G but it is clear that in any moment to get out a query for 2 seconds that queries a column that is not in the composite index.
What is better to continue trying to find the best options for composite indexes, or to make one composite index for 10 fields at once from A to G, for example?
The situation is complicated by the fact that the data is updated very often and the minimum UPDATE time is extremely important.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Fedorov, 2016-09-27
Pyan @marrk2

What is better to continue trying to find the best options for composite indexes,

Here you need to know the measure, do not forget - the more indexes, the more space on the server the database will occupy and the slower the data will be written.
in this case, the index will
not be used, read how indexes are arranged in MySQL search engines...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question