Comments (2)
The % of blocks is perhaps more important, but you can't have that.
The threshold should be rather low. A rather small proportion is already the sign that you need a VACUUM.
I hope to find time to test soon.
from pev2.
I confirm: a few percent of heap fetches is already a disaster.
Examples (in the worst case: old computer, default configuration, not enough RAM, slow HDD) :
- clean table after an INSERT, vacuumed:
QUERY PLAN
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Index Only Scan using demoheapfetches_i_j_idx on demoheapfetches (actual time=0.984..1477.217 rows=1000000 loops=1)
Heap Fetches: 0
Buffers: shared hit=601242 read=2735
Planning:
Buffers: shared hit=6
Planning Time: 0.273 ms
Execution Time: 1751.430 ms
- 10% new lines, autovacuum is lagging: execution time +100 %
QUERY PLAN
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Index Only Scan using demoheapfetches_i_j_idx on demoheapfetches (actual time=0.066..2935.111 rows=1100000 loops=1)
Heap Fetches: 100001
Buffers: shared hit=745883 read=2486
Planning Time: 0.186 ms
Execution Time: 3365.290 ms
- 30% new lines, autovacuum still lagging: execution time × 78 !!
QUERY PLAN
═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Index Only Scan using demoheapfetches_i_j_idx on demoheapfetches (actual time=0.069..136461.243 rows=1300000 loops=1)
Heap Fetches: 300001
Buffers: shared hit=894764 read=112141
Planning Time: 0.205 ms
Execution Time: 136901.507 ms
- after a vacuum: almost back to normal
QUERY PLAN
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Index Only Scan using demoheapfetches_i_j_idx on demoheapfetches (actual time=0.112..2040.199 rows=1300000 loops=1)
Heap Fetches: 0
Buffers: shared hit=811331 read=2857
Planning:
Buffers: shared hit=15 read=2
Planning Time: 349.595 ms
Execution Time: 2405.755 ms
from pev2.
Related Issues (20)
- Warn the user in case the plan is very big
- pev2 fails to reconstruct a copy-pasted plan HOT 3
- Shared blocks stats query summary HOT 1
- Exporting plan as picture HOT 1
- Partitions aggregation
- I/O timing and buffer info is missing HOT 1
- Show the structure of the query
- Impossible to expand worker detail
- Easy copy and paste of a table name & other things
- Node detail is missing info when parsed from text (on "ANY_subquery")
- Small encoding issue in Output tab HOT 1
- Parsing error of Execution Time and JIT time because of double quptes
- IO times along Execution & planning times along throughput HOT 1
- Cannot click in Workers in a parallelized plan HOT 2
- Number of workers launched is not displayed for other nodes than Gather HOT 1
- Multiple versions of a plan
- FR: vscode extension HOT 1
- Dashboard to automatically visualize long-running query plans
- Can't parse plan on Firefox (large value for Index Cond)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pev2.