diff --git a/dbms/tests/performance/string_search/ngram_distance.xml b/dbms/tests/performance/string_search/ngram_distance.xml new file mode 100644 index 00000000000..557928cbf12 --- /dev/null +++ b/dbms/tests/performance/string_search/ngram_distance.xml @@ -0,0 +1,42 @@ + + Distance search performance search + + + search + + + + hits_100m_single + + + loop + + + + 5 + 10000 + + + 50 + 60000 + + + + SELECT DISTINCT Title, ngramDistance(Title, 'what is love') AS distance FROM hits_100m_single ORDER BY distance ASC LIMIT 50 + SELECT DISTINCT Title, ngramDistance(Title, 'baby dont hurt me') AS distance FROM hits_100m_single ORDER BY distance ASC LIMIT 50 + SELECT DISTINCT Title, ngramDistance(Title, 'no more') AS distance FROM hits_100m_single ORDER BY distance ASC LIMIT 50 + SELECT DISTINCT Title, ngramDistanceCaseInsensitive(Title, 'wHAt Is lovE') AS distance FROM hits_100m_single ORDER BY distance ASC LIMIT 50 + SELECT DISTINCT Title, ngramDistanceCaseInsensitive(Title, 'BABY DonT hUrT me') AS distance FROM hits_100m_single ORDER BY distance ASC LIMIT 50 + SELECT DISTINCT Title, ngramDistanceCaseInsensitive(Title, 'nO MOrE') AS distance FROM hits_100m_single ORDER BY distance ASC LIMIT 50 + SELECT DISTINCT Title, ngramDistanceUTF8(Title, 'метрика') AS distance FROM {table} ORDER BY distance ASC LIMIT 50 + SELECT DISTINCT URL, ngramDistanceUTF8(URL, 'как дела') AS distance FROM {table} ORDER BY distance ASC LIMIT 50 + SELECT DISTINCT URL, ngramDistanceUTF8(URL, 'как дела') AS distance FROM {table} ORDER BY distance ASC LIMIT 50 + + SELECT DISTINCT Title, ngramDistanceUTF8CaseInsensitive(Title, 'Метрика') AS distance FROM {table} ORDER BY distance ASC LIMIT 50 + SELECT DISTINCT URL, ngramDistanceUTF8CaseInsensitive(URL, 'как дЕлА') AS distance FROM {table} ORDER BY distance ASC LIMIT 50 + SELECT DISTINCT URL, ngramDistanceUTF8CaseInsensitive(URL, 'Чем зАнимаешЬся') AS distance FROM {table} ORDER BY distance ASC LIMIT 50 + + + + +