# High CPU usage in Postgres: how to detect it, and how to fix it

DevFeed: [High CPU usage in Postgres: how to detect it, and how to fix it](<https://devfeed.tech/articles/high-cpu-usage-in-postgres-how-to-detect-it-and-how-to-fix-it-23790.md>)

Original publisher: [Read original article](<https://cockroachlabs.com/blog/high-cpu-usage-postgres>)

Author: Charlie Custer

Published: 2023-10-16T00:00:00Z

Content type: tutorial

Language: en

Sources: [Cockroach Labs](<https://devfeed.tech/sources/cockroach-labs.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [cpu](<https://devfeed.tech/topics/cpu.md>), [Monitoring](<https://devfeed.tech/topics/monitoring.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [Linux](<https://devfeed.tech/topics/linux.md>)

Tags: [cpu](<https://devfeed.tech/tags/cpu.md>), [linux](<https://devfeed.tech/tags/linux.md>), [monitoring](<https://devfeed.tech/tags/monitoring.md>), [performance](<https://devfeed.tech/tags/performance.md>), [postgres](<https://devfeed.tech/tags/postgres.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>)

## AI overview

This tutorial explains how to detect and troubleshoot high CPU usage in PostgreSQL. It covers monitoring, query statistics, and common causes including inefficient queries, connection patterns, high traffic, and outdated table statistics.

## Source excerpt

High CPU usage can bring your database - and with it, your application - grinding to a halt. This is, unfortunately, a fairly common problem. But it also can be a relatively easy fix. Let's take a look at how to check CPU usage in Postgres, and how to troubleshoot for some of the most common causes of high CPU usage.