sphinxit icon indicating copy to clipboard operation
sphinxit copied to clipboard

Batch queries are really batch?

Open night-crawler opened this issue 11 years ago • 0 comments
trafficstars

Hi, i have a perfomance trouble. I used python sphinxapi before, and sometimes i had strange problems with huge batch queries (unpack exception). Anyway, it worked pretty fast, about 2s. Now i use sphinxit, and the same queries executes for 10s. I have only one question: is it really batch?

for sub_ql_pair in sxql_batch:
        subresult = {}
        sub_ql, sub_alias = sub_ql_pair
        cursor_exec(sub_ql)
        subresult['items'] = [r for r in cursor]

Profiler said some interesting:

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
      670    8.266    0.012    8.266    0.012 {method 'execute' of 'oursql.Cursor' objects}

night-crawler avatar Feb 04 '14 02:02 night-crawler