G
G
grihan2015-03-12 11:41:13
MySQL
grihan, 2015-03-12 11:41:13

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

1 answer(s)
V
Vyacheslav Uspensky, 2015-03-12
@Kwisatz

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 question

Ask a Question

731 491 924 answers to any question