Hey, have you checked the hints at http://freelancing-god.github.com/ts/en/common_issues.html#slow_indexing? In your case, the most important thing should probably be having indexes on all join columns.
If that's not enough, try running Thinking Sphinx' generated SQL query with EXPLAIN to find out where potential bottlenecks are. See http://dev.mysql.com/doc/refman/5.1/en/explain-output.html for some information about the output. - C. On Tuesday, June 21, 2011 at 6:25 PM, dicouw wrote: > Hello ! > > I'm facing a performance problem with TS during the indexation > process. > For my 'classic' model the indexation speed is like 4000 docs/s > for the one that causes me problem, it's 17 docs/s.. > > indexing index 'product_core'... > collected 5044 docs, 0.6 MB > collected 2864419 attr values > sorted 5.7 Mvalues, 100.0% done > sorted 0.5 Mhits, 100.0% done > total 5044 docs, 566867 bytes > total 287.180 sec, 1973 bytes/sec, 17.56 docs/sec > > Here's my code : > > I have a Product model with the following attributes : > > has sellers.places(:id), :as => :place_id, :facet => true > has sellers.places.location(:id), :as > => :product_location_id, :facet => true > has sellers.places.location(:ancestry), :as > => :product_location_ids, :type => :multi, :facet => true > > with : > has_one :location, :through => :address > has_many :sellers, :through => :products_users, :class_name => > "User" > > in User.rb : > > has_many :places, :foreign_key => :owner_id > > and Place has an Address, Address has a Location > > Summary : From Product to Location(:id) > > a product has many sellers, each seller has many places, each > place has an address (polymorphic table), each address has one > location. > > The database is not that full, less than 30 sellers per product, > approximately 10 places per user, and one address for each place. > > I have sql indexes on foreign keys and the ancestry field. > > I don't know if it's just because the schema is complex or if I missed > something.. > > gem versions : > thinking-sphinx (2.0.5) > activerecord (>= 3.0.3) > riddle (>= 1.3.3) > (rails 3 - ruby1.9.2) > > Many thanks ! > > -- > 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] > (mailto:[email protected]). > To unsubscribe from this group, send email to > [email protected] > (mailto:[email protected]). > For more options, visit this group at > http://groups.google.com/group/thinking-sphinx?hl=en. -- 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.
