Answers.Body: <p>If you're specifically looking to trim the <code>entryversions</code> table, there is a <a href="https://craftcms.stackexchange.com/a/10675/57">plugin</a> that can automate the process for you.</p>
  
  <p>Beyond that, you can safely truncate these tables as well when moving between environments:</p>
  
  <pre><code>assetindexdata
  assettransformindex
  sessions
  templatecaches
  templatecachecriteria
  templatecacheelements 
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-02-15T19:23:10.020Z
Answers.LastActivityDate: 2017-02-15T19:23:10.020Z
Answers.LastEditDate: 2017-04-13T12:51:00.200Z
Answers.UserDisplayName: Brad Bell
Body: <p>I would like to reduce the size of a site's database. The reasons are as follows:</p>
  
  <ul>
  <li>To speed up the syncing process from live to local</li>
  <li>To hopefully speed up sql query execution time (an experiment)</li>
  </ul>
  
  <p>I have many sections and hundreds upon hundreds of entries, all with versioning enabled. My question is, is there a way to 'trim the fat', or to put it better perhaps remove stale old version types (perhaps just keep the 5 most revisions for each entry)?</p>
  
  <p>Thanks in advance for you help! </p>
  
Tags: <database><entry-versions>
Title: Reduce Database size
ThreadText: # Reduce Database size
  
  (Asked by: username_0 on 2017-02-15)
  
  I would like to reduce the size of a site's database. The reasons are as follows:
  
  * To speed up the syncing process from live to local
  * To hopefully speed up sql query execution time (an experiment)
  
  I have many sections and hundreds upon hundreds of entries, all with versioning enabled. My question is, is there a way to 'trim the fat', or to put it better perhaps remove stale old version types (perhaps just keep the 5 most revisions for each entry)?
  
  Thanks in advance for you help!
  
  **Tags:** database, entry-versions
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-02-15. Score: 2 | Accepted answer
  
  If you're specifically looking to trim the `entryversions` table, there is a [plugin](https://craftcms.stackexchange.com/a/10675/57) that can automate the process for you.
  
  Beyond that, you can safely truncate these tables as well when moving between environments:
  
  ```
  assetindexdata
  assettransformindex
  sessions
  templatecaches
  templatecachecriteria
  templatecacheelements 
  
  ```
  
  
  ---
  
  