Hi,

I noticed a very bad performance when mass uploading products in my
database. I have isolated the problem and it turned out Sphinx was
slowing down every save by a Query.

My product model:

  class Product < ActiveRecord::Base
    define_index do
      indexes additional_search_text
      indexes title
      has current_price
    end
  end


When I do a save of a product (p.save), my log files show (note the
Sphinx entries):

  SQL (0.1ms)  BEGIN
  AREL (0.3ms)  UPDATE `products` SET `title` = 'product-title',
`updated_at` = '2011-08-25 10:09:46' WHERE `products`.`id` = 2
  Sphinx Query (1.9ms)
  Sphinx  Found 1 result
  SQL (1.0ms)  COMMIT


My question, what is the Sphinx Query doing in the save operation?

I use now a work around by stopping Sphinx, updating the database with
all the new records and then indexing and starting Sphinx again.
Problem is that the text search is not available during the update. Is
there a better solution?

Thanks in advance!

Axel

-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/thinking-sphinx?hl=en.

Reply via email to