There are more than 200 thousand lines in the table (test and its copy test1). In the 'title' column, non-unique str. It is necessary to create a query that produces a table with grouped rows in the column 'title' where there is an entry of the contents of the 'title' of each row. Those.:
SELECT test1.title, count(test1.title) as count FROM test JOIN #ΠΈΠ· ΠΊΠΎΠΏΠΈΠΈ ΡΠ°Π±Π»ΠΈΡΡ Π²ΡΠ±ΠΈΡΠ°Π΅ΠΌ ΠΊΠ°ΠΆΠ΄ΡΡ ΡΡΡΠΎΠΊΡ ΠΈ ΠΈΡΠ΅ΠΌ ΡΡΡΠΎΠΊΠΈ Π² ΠΊΠΎΡΠΎΡΡΡ
Π΅ΡΡΡ #ΡΠΎΠ²ΠΏΠ°Π΄Π΅Π½ΠΈΡ Ρ ΠΈΡΠΊΠΎΠΌΡΠΌ Π·Π½Π°ΡΠ΅Π½ΠΈΠ΅ΠΌ test1 ON test.title LIKE CONCAT('%',test1.title,'%') #Π³ΡΡΠΏΠΏΠΈΡΡΠ΅ΠΌ ΡΠ΅Π·ΡΠ»ΡΡΠ°ΡΡ, ΠΈΠ΄Π΅Ρ ΠΏΠΎΠ΄ΡΡΠ΅Ρ ΡΠΎΠ²ΠΏΠ°Π΄Π΅Π½ΠΈΠΉ GROUP BY test1.title ORDER BY count DESC; The request is launched, but not executed - it completes automatically for 600 seconds.
SELECT * FROM test WHERE MATCH (title) AGAINST ('*test.title*' IN BOOLEAN MODE);- Vasily Butorin