Answers.Body: <p>Nothing to see here. We had a corrupt index.</p>
  
  <p>Running this command in the DB brought our searches down from 90 seconds to 1 or 2 seconds. I'd still love it to be faster. But we can live with 2 seconds:</p>
  
  <pre><code>optimize table searchindex;
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-21T23:18:41.880Z
Answers.LastActivityDate: 2020-01-21T23:18:41.880Z
Answers.UserDisplayName: Tony DeStefano
Body: <p>Anyone have any tips on speeding up entry searches? Ours are currently taking about 90 seconds per search. </p>
  
  <p>Some stats about our Craft database:</p>
  
  <ul>
  <li>Entries: 336,000</li>
  <li>Relations: 4,390,000 (!!!)</li>
  <li>Search Index Records: 320,000</li>
  </ul>
  
  <p>It used to be fast. But the more data we get into it, the slower it goes. It's basically unusable now. We removed indexing on every field except for title, slug and item number. But that didn't help much.</p>
  
Tags: <craft3><database><relations>
Title: Entry Search Unbearably Slow
ThreadText: # Entry Search Unbearably Slow
  
  (Asked by: username_0 on 2020-01-21)
  
  Anyone have any tips on speeding up entry searches? Ours are currently taking about 90 seconds per search.
  
  Some stats about our Craft database:
  
  * Entries: 336,000
  * Relations: 4,390,000 (!!!)
  * Search Index Records: 320,000
  
  It used to be fast. But the more data we get into it, the slower it goes. It's basically unusable now. We removed indexing on every field except for title, slug and item number. But that didn't help much.
  
  **Tags:** craft3, database, relations
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2020-01-21. Score: 2
  
  Nothing to see here. We had a corrupt index.
  
  Running this command in the DB brought our searches down from 90 seconds to 1 or 2 seconds. I'd still love it to be faster. But we can live with 2 seconds:
  
  ```
  optimize table searchindex;
  
  ```
  
  
  ---
  
  