Answer the question
In order to leave comments, you need to log in
How to find the number of identical relationships in the M:M table in MySql?
There is a table in which links are stored by M:M type, about 500 records in total. Links between sentences and words
pk | sentense_id | word_id
When processing a new sentence, you need to understand whether there are already similar sentences in the database (criterion - more than half of the words are the same in both sentences).
the variant with join and grouping with having is not interesting - I'm looking for a variant of optimizing the structure of the database for a quick search.
Has anyone come across something like this before?
Answer the question
In order to leave comments, you need to log in
Throw off your non-optimal query, even if it is with grouping and having and a plan for it, then you can figure out how to do the most optimally (writing from scratch is a little lazy)
But IMHO you should immediately look away from mysql
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question