L
L
lega2012-10-10 09:17:34
Sphinx
lega, 2012-10-10 09:17:34

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
}


Here is what "SHOW META;" produces:
Query "10*"
{'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тыс подобных строк


If you look at the number of entries, then:
Запрос "10*", total_found=20756; 20 сек
Запрос "100*", total_found=683; 15 сек
Запрос "25*", total_found=7244; 0.14 сек

Sphinx 2.0.5-release (r3308; Jul 28, 2012)

What's wrong, what can I do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Puma Thailand, 2012-10-10
@opium

And why are they in your realtime index?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question