Body: <p>Looking for someone well  versed in the dark arts of PostgreSQL for some potential consultancy (or anyone that can offer hints, tips and advise).</p>
  <p>We have always worked with MySQL and made some naïve assumptions that we would be able to migrate across to PostgreSQL at client's behest but hitting huge page load and performance issues, whether that is with managed database (Digital Ocean) or locally.</p>
  <p>Client had advised PosgreSQL but they and us are drawing blanks why the TTFB is so slow both front- and back-end. Even throwing more memory at the managed database isn't really helping (currently 8 GB RAM / 4vCPU / 115 GB Disk).</p>
  <p>To note following:</p>
  <ul>
  <li>Craft Pro 4.3.5 (multisite)</li>
  <li>PHP 8.1.13</li>
  <li>PostgreSQL 14.6</li>
  </ul>
  <p>Following plugins in place:</p>
  <ul>
  <li>Amazon S3</li>
  <li>Blitz</li>
  <li>Embedded Assets</li>
  <li>Feed Me</li>
  <li>Formie</li>
  <li>Imager X</li>
  <li>Navigation</li>
  <li>Neo</li>
  <li>Redactor</li>
  <li>SEOmatic</li>
  <li>Site Switcher</li>
  <li>Sprig</li>
  <li>Typed link field</li>
  <li>Vite</li>
  </ul>
  <p>Cole</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-12-20T15:59:00.480Z
Comments.Text: What exactly is the question? Employment posts are not permitted, so if you’re just looking to hire someone, this post will be deleted.
Comments.UserDisplayName: Lindsey D
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-12-20T16:21:53.797Z
Comments.Text: Sorry Lindsey - lemme rephrase. We are having huge performance issues with a Craft 4 site running on PostgreSQL (admittedly our first using this DB engine).
  
  Wondering firstly if anyone has any experience or advise on running Craft with PostgreSQL as there is little out there in terms of hints and tips (except some comments/similar experiences on Discord).
  
  Failing that "HELP!" as we have a brand new site we are preparing to launch and currently despite using a maxed out DB server the site runs like a one-legged diplodocus in a swimming pool full of honey.
Comments.UserDisplayName: Cole Henley
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-12-20T19:08:26.807Z
Comments.Text: No worries. Can you hone in on a specific question? Asking for general performance tips is still incredibly broad and risks being closed for that reason.
Comments.UserDisplayName: Lindsey D
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-12-20T19:09:29.693Z
Comments.Text: FWIW, you may find Discord to be a better forum for broad, advice-based questions like this one.
Comments.UserDisplayName: Lindsey D
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-12-21T10:31:58.567Z
Comments.Text: Thanks @LindseyD and totally understand. Sadly it is difficult for us to provide more specifics as everything is running so slowly! Am asking on Devops but wanted to also ask here as Stack Exchange remains (for me at least) the best place to find answers on Craft-based issues so perhaps if something obvious or consistent (eg not project specific) then might help somebody else in the future!
Comments.UserDisplayName: Cole Henley
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-12-22T03:06:26.850Z
Comments.Text: You mention TTFB, but are you sure it's the database that's causing the underlying slowdown and not PHP processing? I'd probably start by using the debug toolbar to verify that.
Comments.UserDisplayName: Brad Bell
Tags: <database><performance><speed><postgresql>
Title: PostgreSQL performance
ThreadText: # PostgreSQL performance
  
  (Asked by: username_0 on 2022-12-20)
  
  Looking for someone well versed in the dark arts of PostgreSQL for some potential consultancy (or anyone that can offer hints, tips and advise).
  
  We have always worked with MySQL and made some naïve assumptions that we would be able to migrate across to PostgreSQL at client's behest but hitting huge page load and performance issues, whether that is with managed database (Digital Ocean) or locally.
  
  Client had advised PosgreSQL but they and us are drawing blanks why the TTFB is so slow both front- and back-end. Even throwing more memory at the managed database isn't really helping (currently 8 GB RAM / 4vCPU / 115 GB Disk).
  
  To note following:
  
  * Craft Pro 4.3.5 (multisite)
  * PHP 8.1.13
  * PostgreSQL 14.6
  
  Following plugins in place:
  
  * Amazon S3
  * Blitz
  * Embedded Assets
  * Feed Me
  * Formie
  * Imager X
  * Navigation
  * Neo
  * Redactor
  * SEOmatic
  * Site Switcher
  * Sprig
  * Typed link field
  * Vite
  
  username_0
  
  **Tags:** database, performance, speed, postgresql
  
  > **Comments:**
  > **username_1**: What exactly is the question? Employment posts are not permitted, so if you’re just looking to hire someone, this post will be deleted.  
  > **username_0**: Sorry username_1 - lemme rephrase. We are having huge performance issues with a Craft 4 site running on PostgreSQL (admittedly our first using this DB engine).  Wondering firstly if anyone has any experience or advise on running Craft with PostgreSQL as there is little out there in terms of hints and tips (except some comments/similar experiences on Discord).  Failing that "HELP!" as we have a brand new site we are preparing to launch and currently despite using a maxed out DB server the site runs like a one-legged diplodocus in a swimming pool full of honey.  
  > **username_1**: No worries. Can you hone in on a specific question? Asking for general performance tips is still incredibly broad and risks being closed for that reason.  
  > **username_1**: FWIW, you may find Discord to be a better forum for broad, advice-based questions like this one.  
  > **username_0**: Thanks @username_1 and totally understand. Sadly it is difficult for us to provide more specifics as everything is running so slowly! Am asking on Devops but wanted to also ask here as Stack Exchange remains (for me at least) the best place to find answers on Craft-based issues so perhaps if something obvious or consistent (eg not project specific) then might help somebody else in the future!  
  > **username_2**: You mention TTFB, but are you sure it's the database that's causing the underlying slowdown and not PHP processing? I'd probably start by using the debug toolbar to verify that.  
  
  ---
  
  ## 0 answers
  
  