<p>It's not <em>that</em> big in all honesty.</p>
<p>You can see the biggest tables by running</p>
<pre><code>SELECT table_name AS &quot;Tables&quot;, round(((data_length + index_length) / 1024 / 1024), 2) &quot;Size in MB&quot; FROM information_schema.TABLES WHERE table_schema = &quot;your_db_name&quot; ORDER BY (data_length + index_length) DESC;
</code></pre>
<p>Also worth checking max revisions.</p>
<p>You can set the max revisions in config <a href="https://craftcms.com/docs/4.x/config/general.html#maxrevisions" rel="nofollow noreferrer">https://craftcms.com/docs/4.x/config/general.html#maxrevisions</a></p>

CC BY-SA 4.0
2022-12-13T15:37:44.523Z
2022-12-13T15:37:44.523Z
Steven Grant
<p>I have a problem with the database. It weighs a whopping 450 megabytes. That's a lot. It increases by about 20 megabytes per night. I suspect that this has something to do with the CRON task: an http request is executed every hour that triggers an update of prices in the game catalog.</p>
<p>Question 1. I looked, there is a saving of versions of each record every hour. How to prohibit this saving?</p>
<p>Question 2. The database weighs 450 megabytes. Do they really weigh that much? If this is the case and disabling version control will help, then how and where to clean all these versions so that the database does not weigh so much?</p>

CC BY-SA 4.0
2022-12-13T13:36:40.283Z
Have you checked which database tables contain all that data? What records are being saved every hour?
MoritzLost
CC BY-SA 4.0
2022-12-13T13:44:05.050Z
@MoritzLost
 The "queue" table increases in size. Added a lot of entries with the description "t9n:["app","Updating search indexes"]"
Dimi
CC BY-SA 4.0
2022-12-13T14:12:45.367Z
You might want to check if these tasks are also run. If you do not trigger the queue/run command, the queued tasks will only be run when somebody logs into the backend. But you can write another cronjob to run the queue. You can read more about that here: https://nystudio107.com/blog/robust-queue-job-handling-in-craft-cms
Max Strebel
CC BY-SA 4.0
2022-12-13T16:37:26.830Z
You should add some context about the size of your site - i.e., how many sites, sections and entries does it have? 450MB for a single site with only a small number of entries would be considered huge, but for a multi-site installation with 10k entries it would be considered very small.
James Smith
CC BY-SA 4.0
2022-12-13T16:57:06.730Z
450 BM in my case is a lot. There are only 200-250 entries. Sections 12. Site one
Dimi
CC BY-SA 4.0
2022-12-13T17:39:24.830Z
Your queue table should generally be empty. Jobs are only stored while they're queued, and only remain there if they failed. Are you sure you're executing your queue as per Max's comment?
James Smith
<craft3>
The size of the database has increased. How to reduce it?
# The size of the database has increased. How to reduce it?

(Asked by: username_0 on 2022-12-13)

I have a problem with the database. It weighs a whopping 450 megabytes. That's a lot. It increases by about 20 megabytes per night. I suspect that this has something to do with the CRON task: an http request is executed every hour that triggers an update of prices in the game catalog.

Question 1. I looked, there is a saving of versions of each record every hour. How to prohibit this saving?

Question 2. The database weighs 450 megabytes. Do they really weigh that much? If this is the case and disabling version control will help, then how and where to clean all these versions so that the database does not weigh so much?

**Tags:** craft3
> **Comments:**
> **username_1**: Have you checked which database tables contain all that data? What records are being saved every hour?  
> **username_0**: @MoritzLost  The "queue" table increases in size. Added a lot of entries with the description "t9n:["app","Updating search indexes"]"  
> **username_2**: You might want to check if these tasks are also run. If you do not trigger the queue/run command, the queued tasks will only be run when somebody logs into the backend. But you can write another cronjob to run the queue. You can read more about that here: https://nystudio107.com/blog/robust-queue-job-handling-in-craft-cms  
> **username_3**: You should add some context about the size of your site - i.e., how many sites, sections and entries does it have? 450MB for a single site with only a small number of entries would be considered huge, but for a multi-site installation with 10k entries it would be considered very small.  
> **username_0**: 450 BM in my case is a lot. There are only 200-250 entries. Sections 12. Site one  
> **username_3**: Your queue table should generally be empty. Jobs are only stored while they're queued, and only remain there if they failed. Are you sure you're executing your queue as per Max's comment?  

---

## 1 answers

### Answer by username_4 on 2022-12-13. Score: 1

It's not that big in all honesty.
You can see the biggest tables by running
SELECT table_name AS "Tables", round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB" FROM information_schema.TABLES WHERE table_schema = "your_db_name" ORDER BY (data_length + index_length) DESC;

Also worth checking max revisions.
You can set the max revisions in config https://craftcms.com/docs/4.x/config/general.html#maxrevisions


---

