New answers tagged postgresql-performance
1
vote
Accepted
Difference between RLS and WHERE condition (e.g. in views)
The differences between row-level security and a view with an appropriate WHERE condition are:
restrictions in a view definition don't apply when you query the underlying table directly
row-level ...
1
vote
PostgreSQL Query with LIMIT Takes Long to Execute When Fewer Rows Are Left (Last Page of Pagination)
The upper end of the "timestamp" column contains at least 25, but less than 100, things which meet your IN-list condition. So finding 25 is easy, but then it has to read past another 23 ...
0
votes
How to Reorder Primary Key Constraint on a Large TimescaleDB Table Without Downtime?
Want to improve performance?
Database: PostgreSQL (12.18), TimescaleDB (1.7.5) Table Name: sampleTable
Please, update your postgresql to 16 and TimescaleDB latest versions! You'll get a lot of ...
1
vote
Remove application pool when installer PgBouncer?
You should not add pgbouncer unless it helps solve some problem. It is just another thing to configure, to break, and to the add latency. You haven't described any problem which pgbouncer is likely ...
0
votes
Accepted
Remove application pool when installer PgBouncer?
It's definitely a good idea to use pooling at database side since you have multiple app instances. All 20 app instances can be effectively pooled at database reusing server(DB) connections. However I ...
1
vote
Accepted
Cast polygon to json array and json array to polygon
Yes, there is a better way:
CREATE OR REPLACE FUNCTION json_to_polygon (p_poly json)
RETURNS polygon
LANGUAGE sql PARALLEL SAFE STRICT IMMUTABLE
RETURN replace(replace(replace(
p_poly::...
0
votes
Multithreaded inserts in postgresql
With PostgreSQL you can have multiple COPY commands running into the same table at the same time. Whether this results in a large improvement or a small one or none at all depends on what the ...
1
vote
What is the cause of this intermittent slow query when counting rows over a single indexed text column in PostgreSQL?
My guess is that sometimes a lot of the heap pages are buffered, and the queries run quickly. Other times the buffer is loaded with other pages, and so you end up waiting to read the data from the ...
0
votes
What is the cause of this intermittent slow query when counting rows over a single indexed text column in PostgreSQL?
Based on my testing described in my revised question and advice from answers to similar questions (see here and here), I have implemented the following changes:
Created a partial index on the status ...
Top 50 recent answers are included
Related Tags
postgresql-performance × 1156postgresql × 1079
performance × 464
index × 136
query-performance × 133
execution-plan × 67
optimization × 66
index-tuning × 56
postgresql-9.6 × 39
database-design × 37
postgresql-12 × 28
amazon-rds × 27
postgresql-13 × 27
join × 26
partitioning × 24
postgresql-11 × 24
explain × 23
postgresql-9.5 × 22
postgresql-10 × 18
update × 17
postgresql-9.3 × 17
postgis × 17
postgresql-14 × 17
performance-tuning × 16
postgresql-9.4 × 15