Answer the question
In order to leave comments, you need to log in
Sphinx, realtime index, search for the number "10" in the text is terribly slow
There are about 900K objects in the index.
of which 500K are addresses (KLADR/FIAS
) - searches fast = 20..100 ms
Requests: "25*", "99*", "1000*" - also fast.
! But if you search for "10*" or "100*", then the search takes up to 20 seconds - this is 200 times slower,
what could be the problem?
The query is:
select id from crm1f where match("100*") and otype=163 order by when desc limit 0, 15;
Config:
index crm1f
{
type = rt
rt_mem_limit = 512M
path = /var/data/sphinx/crm1f
charset_type = utf-8
rt_field = content
rt_attr_uint = otype
rt_attr_uint = is_removed
rt_attr_timestamp = when
morphology = none
dict = keywords
min_prefix_len = 2
enable_star = 1
}
{'Value': u'1000', 'Variable_name': u'total'}
{'Value': u'20756', 'Variable_name': u'total_found'}
{'Value': u'20.207', 'Variable_name': u'time'}
{'Value': u'10', 'Variable_name': u'keyword[0]'}
{'Value': u'36017', 'Variable_name': u'docs[0]'}
{'Value': u'58244', 'Variable_name': u'hits[0]'}
... и ещё 27тыс подобных строк
Запрос "10*", total_found=20756; 20 сек
Запрос "100*", total_found=683; 15 сек
Запрос "25*", total_found=7244; 0.14 сек
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question