CARVIEW |
Select Language
HTTP/2 200
date: Wed, 23 Jul 2025 12:13:00 GMT
content-type: text/html; charset=utf-8
cf-ray: 963b16d7de6275e9-BLR
cf-cache-status: DYNAMIC
cache-control: private
set-cookie: prov=cd4860c7-bccf-4ea7-8239-a79dc5e59316; expires=Thu, 23 Jul 2026 12:12:59 GMT; domain=.stackexchange.com; path=/; secure; httponly
strict-transport-security: max-age=31536000; includeSubDomains
vary: Accept-Encoding
content-security-policy: upgrade-insecure-requests; frame-ancestors 'self' https://stackexchange.com
x-frame-options: SAMEORIGIN
x-request-guid: e7f2118d-b9db-4002-9d25-76d97193ff69
x-worker-origin-response-time: 532000000
x-dns-prefetch-control: off
set-cookie: prov=cd4860c7-bccf-4ea7-8239-a79dc5e59316; Path=/; HttpOnly; Domain=stackexchange.com
set-cookie: __cf_bm=7oGgm4T2r_z4f23RUPrCPs3j4.F1j2_C5a8WKP_0FmA-1753272780-1.0.1.1-Oq9Xr8yrWvUAdFg3CmVr9X_h1w_W5WP5huQcRYFrmmhmPUKNjFDNCg6_1BmZTCLSDSHmAMpYzvWkc9ll7myVI0hQ3CqThf.A3nMX.C84nXU; path=/; expires=Wed, 23-Jul-25 12:43:00 GMT; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
set-cookie: _cfuvid=AiSqdJpfL1oAy56tkECFV9y57aqtg79XcK6zfJJFA68-1753272780041-0.0.1.1-604800000; path=/; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
server: cloudflare
content-encoding: gzip
Newest 'postgresql-performance' Questions - Database Administrators Stack Exchange
Skip to main content
Stack Exchange Network
Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack ExchangeTeams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about TeamsQuestions tagged [postgresql-performance]
Performance issues with PostgreSQL queries
1,298 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
1
answer
44
views
Postgres query planner join selectivity greater than 1?
I am using PostgreSQL 14.17.
I am trying to debug a query planner failure in a bigger query, but I think I've narrowed down the
problem to a self-join on a join table:
SELECT t2.item_id
FROM ...
0
votes
0
answers
28
views
VACUUM: ERROR: invalid memory alloc request size postgresql
I am getting
ERROR: invalid memory alloc request size 2727388320
after I tried vacuuming in EnterpriseDB. It is getting bigger and bigger. How to solve this issue now ?
0
votes
2
answers
83
views
What will be the root cause for the incident?
I’m facing a strange issue with PostgreSQL query performance. The same query runs in under 1 second during certain periods, but takes around 20 seconds at other times. However, the data volume and ...
0
votes
1
answer
34
views
is this a good pratice, using varchar as data type while creating a dimension table
I am modeling my star schema. So, I want to create my dimension table for the customer, and the primary key from the raw table is a varchar. Is it advisable to make a surrogate key that will stand as ...
2
votes
0
answers
25
views
How can I use multicolumn indexes to efficiently find the most recent record for EACH unique id (Postgres)? [duplicate]
I have a large temporal table (>20 million rows) that contains data over time on about 15k unique objects. I can't figure out how to efficiently query "get the most recent record for each ...
1
vote
0
answers
68
views
pg_class.reltuples/n_live_tup almost doubles after VACUUM and drops back after ANALYZE
I have a table with around 400k rows. With the current autovacuum configuration, the table is automatically vacuumed and analyzed up to 4 times daily. There are usually a couple of hours between the ...
0
votes
1
answer
41
views
Sync source table of 500gb or 300 million records. to a target table in same schema with minimal downtime in 10 or 20 minutes
We have a source table called events containing data of 500gb for various customers.
we have column in this events table which is hex values . The source table has foreign references to other tables**....
0
votes
1
answer
41
views
pg_basebackup duration of 500G
How long should the duration of a pg_basebackup of around 500G usually should be?
Currently it takes about 7hrs.
What could be done to speed up this process?
We create the backup locally and move it ...
1
vote
0
answers
51
views
Aurora PostgreSQL Severe Performance Degradation Under Concurrent Load
Environment:
Database: AWS Aurora PostgreSQL
ORM: SQLAlchemy
API Framework: Python FastAPI
Issue:
I'm experiencing significant query performance degradation when my API receives concurrent requests. ...
2
votes
1
answer
316
views
the sql was slow with first time run in PostgreSQL 14
I have a SQL statement that runs slow the first time. The second time it will take only 6s and the first time will take more than 50s.
How can I reproduce my observations with the first run of the ...
1
vote
0
answers
57
views
Bitmap Index Scan slow performance in postgresql
I have a table that contains accumulated sales of many products over time. The schema is as follows:
CREATE TABLE IF NOT EXISTS public.accumulated_sales
(
id bigint NOT NULL,
sale_date ...
0
votes
1
answer
110
views
Postgres Query Slow 0.05% of the time
I have the following tables:
CREATE TABLE IF NOT EXISTS users
(
id NUMERIC(20, 0) NOT NULL DEFAULT NEXTVAL('users_sequence') PRIMARY KEY,
list_id ...
4
votes
0
answers
184
views
Postgres: Queries are too slow after upgrading to PG17 from PG15
Most of the queries got slower after upgrading our postgres from version 15 to 17 using pg_upgrade. I reconfirmed that "vaccuum, analyze" were all taken care.
To debug, instead of upgrade, I ...
6
votes
2
answers
385
views
Postgres index not used when select includes timestamp::text conversion
I have the following table (in PostgreSQL 14.6):
create table waste_trajectory
(
id uuid default uuid_generate_v4() not null primary key,
observation_id uuid not null,
...
2
votes
1
answer
61
views
PG 13 write performance deteriorates after OS Upgrade Win Server 2012r2 to 2019 with LWLock WALWrite statuses
I've upgraded the OS on PG database server from Win Server 2012r2 Standard to 2019 Standard. Nothing else was changed. Now I see write throughput deteriorates greatly during peak update times with ...
- The Overflow Blog
-
-
- Featured on Meta
-
-
Related Tags
postgresql × 1214
performance × 547
index × 168
query-performance × 152
execution-plan × 86
optimization × 86
index-tuning × 64
database-design × 46
postgresql-9.6 × 46
amazon-rds × 32
join × 32
postgresql-11 × 30
postgresql-9.5 × 30
postgresql-10 × 29
postgresql-13 × 29
postgresql-12 × 28
partitioning × 27
postgresql-9.3 × 26
explain × 25
postgresql-9.4 × 24
update × 21
postgis × 20
greatest-n-per-group × 17
performance-tuning × 17
postgresql-14 × 17
more related tags
Hot Network Questions
- Not sure which test statistic to look at with regression with interaction term
- Do the constructible lines and circles (not merely their intersections) cover the plane?
- Is classical logic the consensus among contemporary logicians?
- How to run CorePipeline.Run("contentSearch.PopulateSolrSchema", args); outside of regular sitecore environment
- Behavior change in Libreoffice versions after 5.4 pressing Enter below a full-text-width image
- Are some of (most of?) what we describe as "mistakes of our senses/perception", mistakes of our reasoning process?
- rEAAlly good for you
- OId Movie about an alien city that plays a repeating melody
- Prevent equation label from shifting down
- Repository with SQLite in Python
- Differential amplifier layout: closer to MCU or Load?
- In QGIS installed via OSGeo4W on Windows 11, what is the path to the command history file for the Python console?
- TeX development in C instead of Pascal
- When is XLOOKUP() faster than VLOOKUP()?
- grep behaviour is different when run using bash -c '...'
- Is a diet of one third Tuna ok for an eldery cat?
- What does this "lightbulb-ish" symbol mean in figure 1 of the Diffie Hellmann paper?
- How should a typical reward curve look like while training a RL model
- Define command valid only for a specific environment in expl3
- What is the consistency strength of Russell & Whitehead's ‘Principia Mathematica’?
- Calculating the wall thickness in a hollow rotating cylinder space habitat
- Why is the number of Marie Curie postdoctoral fellowships in mathematics significantly lower than in other subjects?
- Ubuntu gives the message "You are in emergency mode."
- How to 'scale' a square list?