A
A
Anton Shelestov2020-05-14 09:53:49
MySQL
Anton Shelestov, 2020-05-14 09:53:49

What index would you recommend to create?

Hello!

There is a table that stores all the url paths on the site: There are
5ebcea4184e83954925250.png
5ebcea5fb0471647047830.png

more than 40k
records. I am looking for the desired record with a query:

select * from path_urls where path = 'mgu' and model_type = 'App\\EducationalInstitution'

The request took 0.0478 seconds.

Please explain how to create indexes for these fields?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lazy @BojackHorseman MySQL, 2020-05-14
Tag

make sane value classifiers for path and model_type and a regular composite index on these two fields

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question