# How to optimize postgres and the discourse DB

**URL:** https://meta.discourse.org/t/how-to-optimize-postgres-and-the-discourse-db/338275
**Category:** Support
**Tags:** postgres
**Created:** [November 25, 2024, 4:31pm UTC](https://meta.discourse.org/t/how-to-optimize-postgres-and-the-discourse-db/338275 "2024-11-25T16:31:49Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![Abdelrahman\_MoHamed](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/abdelrahman_mohamed/32/467712_2.png) [@Abdelrahman\_MoHamed](https://meta.discourse.org/u/Abdelrahman_MoHamed)
#### Post date: [November 25, 2024, 4:31pm UTC](https://meta.discourse.org/t/how-to-optimize-postgres-and-the-discourse-db/338275/1 "2024-11-25T16:31:49Z")

</div>

- Sometimes DB gets fired because of some queries, and we were told that we need to optimize the PostgreSQL, any idea hot to achieve this?  
In the screen below this is our DB resources
  - CPU: 4 vcpu
  - Memory: 22 GB

 ![image](https://global.discourse-cdn.com/meta/original/4X/b/d/9/bd9097eec40df195e828fe6128a1308b6ba54ebf.png)

---

_[View the full topic](https://meta.discourse.org/t/how-to-optimize-postgres-and-the-discourse-db/338275)._
