Search code examples
ruby-on-railsthinking-sphinx

Thinking sphinx put indexes on swap device


I am using thinking sphinx version 2.0.10 in rails for full text search and I am dealing with millions of record in Database. it take huge time to return result. so is there any way to keep the indexes on swap device. so it will work faster.

Thank You for Help


Solution

  • Thinking Sphinx configures Sphinx to store attributes in memory - but as far as I know there's no such setting that applies to field data. Sphinx index files can be stored on any disk you like though, instead of just RAILS_ROOT/db/sphinx/RAILS_ENV - this is configured using the searchd_file_path setting in config/sphinx.yml.

    Perhaps you could elaborate on how you're using Sphinx and Thinking Sphinx - what kinds of queries you're running that are slow, and what the relevant index structures look like. There may be other ways of improving the speed of this.