CARVIEW |
Select Language
HTTP/2 200
date: Sat, 26 Jul 2025 02:12:03 GMT
content-type: text/html; charset=utf-8
cf-ray: 96505eab9fa4e9c3-BLR
cf-cache-status: DYNAMIC
cache-control: private
set-cookie: prov=a507a777-ace1-4ae0-9d0e-9fe908cfc58f; expires=Sun, 26 Jul 2026 02:12:02 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-clacks-overhead: GNU Terry Pratchett
x-frame-options: SAMEORIGIN
x-request-guid: 48eb94fc-8bc9-4368-8247-ad71bf9fff46
x-worker-origin-response-time: 516000000
x-dns-prefetch-control: off
set-cookie: prov=a507a777-ace1-4ae0-9d0e-9fe908cfc58f; Path=/; HttpOnly; Domain=stackexchange.com
set-cookie: __cf_bm=h9q0uUPC6fyzOgE51PIO2UefELTCcxgzdOmLd3bJXr0-1753495923-1.0.1.1-sqTcIMjk3SpA5UBMQUbf4nWWsDGA1kiWsV2SsWehwGG6bt8NCwUwhsF.kBC2Z_DqKaQYyUsNpivBUlIh4r.olrXNue1zuqX9rRWo.2tfrKE; path=/; expires=Sat, 26-Jul-25 02:42:03 GMT; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
set-cookie: _cfuvid=NHfSs8pT9jDcNPCkmP62BDI5PI804D7qsAbEcOuQZIU-1753495923023-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)
0
votes
1
answer
10
views
Is there a way to get transaction time statistics on a specific table
I saw some log entries that indicated transaction time outliers of up to 10s at times, where transaction times are typically below 1s. To get a view of how often this happens, is there a way to get ...
1
vote
1
answer
45
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
29
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
84
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
71
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
317
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
185
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,
...
- The Overflow Blog
-
-
- Featured on Meta
-
-
Related Tags
postgresql × 1215
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
- tac-command is it a bug or a misinterpretation of the manual?
- Why does the node Bounding Box suddenly produce a different result in version 4.5?
- Not being introduced to the team – should I ask for it?
- Is it okay to email researchers if I’m just a high school student?
- Heavy shelves, but not a center stud
- About Harp Pedaling for a Pentatonic Glissando
- Why does “brew search” for “peertube” match with “freetube”? How does the search work?
- How many simple groups are there of a given infinite cardinality?
- Set pdftitle/pdfauthor to the value of a custom expl3 command
- Anonymizing a submission for double-blind review
- Computing the first variation of a variational integral
- How to extend an MDF shelf?
- What does this word "ahn-shdah-heh" mean?
- About security concerns using in find -exec vs interactively performing the same task
- Make a Mulenère encryption program
- A question about as ..... as comparison
- Most practical way to determine concentration of reducing sugar in frozen French fries?
- Why aren't there baleen whales at about the size of a dolphin?
- Moving multiplying cells away
- Does Philosophy Need Quotes?
- Do the constructible lines and circles (not merely their intersections) cover the plane?
- Why does my laptop's display turn off when I'm away from the keyboard?
- How can I integrate mmwave presence sensors into an alarm system?
- Is it decidable whether a CFL can be recognized by a linear CFG?