D
D
Dmitry2016-09-14 16:12:17
Sphinx
Dmitry, 2016-09-14 16:12:17

Why is it taking so long to find sphinx?

Good afternoon everyone, the question is actually this about the speed of the search, the occurrences of strings in some text are searched.
In general, the database is quite large 35 million records of 400 characters in each +- record of the type:
id, contents
I would like to know if the search takes an average of 1.5-2
seconds for each line in which 20-15 characters, is that a lot?

source parent{
        type = mysql
        sql_host = localhost
        sql_user = root
        sql_pass = root
        sql_db = bse
        sql_port = 3306
        sql_query_pre = SET NAMES utf8
        sql_query_pre = SET CHARACTER SET utf8
}

source bse0: parent {
        sql_query = SELECT ID AS id, content FROM p_contents where ID % 4 = 0
}
source bse1: parent {
        sql_query = SELECT ID AS id, content FROM p_contents where ID % 4 = 1
}
source bse2: parent {
        sql_query = SELECT ID AS id, content FROM p_contents where ID % 4 = 2
}
source bse3: parent {
        sql_query = SELECT ID AS id, content FROM p_contents where ID % 4 = 3
}

index ind_bse_base {
        type = plain
        path = /var/lib/sphinxsearch/data/ind_bse_base
        docinfo = extern
        morphology = stem_enru
        index_exact_words = 0
        min_word_len = 3
        charset_table = 0..9, A..Z->a..z, _, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F
}
index ind_bse0: ind_bse_base {
        source = bse0
        path = /var/lib/sphinxsearch/data/ind_bse0
}
index ind_bse1: ind_bse_base {
        source = bse1
        path = /var/lib/sphinxsearch/data/ind_bse1
}
index ind_bse2: ind_bse_base {
        source = bse2
        path = /var/lib/sphinxsearch/data/ind_bse2
}
index ind_bse3: ind_bse_base {
        source = bse3
        path = /var/lib/sphinxsearch/data/ind_bse3
}

index bse: ind_bse_base {
        type = distributed
        local = ind_bse0
        agent = localhost:9312:ind_bse1
        agent = localhost:9312:ind_bse2
        agent = localhost:9312:ind_bse3

        path = /var/lib/sphinxsearch/data/bse
}

indexer{
        mem_limit = 1024M
}

searchd{
        listen = localhost:9312
        listen = localhost:9306:mysql41
        log = /var/log/sphinxsearch/searchd.log
        query_log = /var/log/sphinxsearch/query.log
        read_timeout = 20
        max_children = 0
        dist_threads = 4
        pid_file = /etc/sphinxsearch/searchd.pid
        binlog_path = /var/lib/sphinxsearch/data
        workers = threads
        query_log_format = sphinxql
        max_batch_queries = 1500
}

if so, what is the problem?
---
attach query log:
/* Wed Sep 14 16:50:08.837 2016 conn 72 real 2.785 wall 2.785 found 0 */ SELECT * FROM bse WHERE MATCH('@content "принцип внутреннего равенства"');
/* Wed Sep 14 16:49:58.068 2016 conn 72 real 1.325 wall 1.325 found 0 */ SELECT * FROM bse WHERE MATCH('@content "24 Система оплаты труда строится на основе ряда принципов: оплата труда непосредственно зависит от стратегии Банка, которая влияет на выбор критериев оценки результатов труда, род занятий работников и систему оплаты труда"');
/* Wed Sep 14 16:49:56.082 2016 conn 72 real 7.923 wall 7.923 found 0 */ SELECT * FROM bse WHERE MATCH('@content "Результаты таких проектов могут в дальнейшем использоваться в работе Банка"');
/* Wed Sep 14 16:49:48.158 2016 conn 72 real 1.269 wall 1.269 found 0 */ SELECT * FROM bse WHERE MATCH('@content "22 Сотрудники, работающие над подготовкой диссертации, диплома, учебного проекта в университете или колледже, могут обратиться к своему непосредственному руководителю или руководителю службы по работе с персоналом для совместного выбора темы, прикрепления руководителя из числа опытных в этой области сотрудников Банка и дальнейшего развития темы работы"');

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Puma Thailand, 2016-09-14
@opium

it would be logical to show the qveri log

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question