explain.depesz.com

PostgreSQL's explain analyze made readable

Result: G34X

Settings
# exclusive inclusive rows x rows loops node
1. 1.067 5,427.838 ↓ 510.0 510 1

GroupAggregate (cost=62,065.30..62,065.31 rows=1 width=49) (actual time=5,426.370..5,427.838 rows=510 loops=1)

  • Group Key: t6._fld567rref
2. 1.200 5,426.771 ↓ 510.0 510 1

Sort (cost=62,065.30..62,065.30 rows=1 width=23) (actual time=5,426.356..5,426.771 rows=510 loops=1)

  • Sort Key: t6._fld567rref
  • Sort Method: quicksort Memory: 64kB
3. 1.338 5,425.571 ↓ 510.0 510 1

Hash Join (cost=61,359.66..62,065.27 rows=1 width=23) (actual time=5,423.539..5,425.571 rows=510 loops=1)

  • Hash Cond: (t7._fld52rref = t4._fld567rref)
4. 0.740 0.740 ↑ 1.6 510 1

Index Scan using _document30_vt50_sk on _document30_vt50 t7 (cost=0.17..704.58 rows=795 width=20) (actual time=0.027..0.740 rows=510 loops=1)

  • Index Cond: (_document30_idrref = '\\xbeab00090ffe000111e8fd5604f5605b'::bytea)
5. 31.310 5,423.493 ↓ 20,000.0 20,000 1

Hash (cost=61,359.48..61,359.48 rows=1 width=40) (actual time=5,423.492..5,423.493 rows=20,000 loops=1)

  • Buckets: 32768 (originally 1024) Batches: 1 (originally 1) Memory Usage: 1654kB
6. 80.715 5,392.183 ↓ 20,000.0 20,000 1

Nested Loop (cost=61,241.61..61,359.48 rows=1 width=40) (actual time=4,948.461..5,392.183 rows=20,000 loops=1)

7. 140.194 5,111.468 ↓ 740.7 20,000 1

GroupAggregate (cost=61,241.38..61,244.46 rows=27 width=74) (actual time=4,948.402..5,111.468 rows=20,000 loops=1)

  • Group Key: (max(t4._period)), t4._fld567rref, t4._fld568rref
8. 76.155 4,971.274 ↓ 740.7 20,000 1

Sort (cost=61,241.38..61,241.41 rows=27 width=59) (actual time=4,947.994..4,971.274 rows=20,000 loops=1)

  • Sort Key: (max(t4._period)), t4._fld567rref, t4._fld568rref
  • Sort Method: quicksort Memory: 3581kB
9. 1,367.054 4,895.119 ↓ 740.7 20,000 1

Hash Join (cost=30,747.40..61,240.65 rows=27 width=59) (actual time=2,348.283..4,895.119 rows=20,000 loops=1)

  • Hash Cond: ((t5._fld567rref = t4._fld567rref) AND (t5._fld568rref = t4._fld568rref) AND (t5._period = (max(t4._period))))
10. 1,179.910 1,179.910 ↑ 1.0 1,070,457 1

Seq Scan on _inforg566 t5 (cost=0.00..27,118.02 rows=1,071,502 width=59) (actual time=0.019..1,179.910 rows=1,070,457 loops=1)

  • Filter: _active
11. 22.807 2,348.155 ↓ 1.6 20,000 1

Hash (cost=30,583.97..30,583.97 rows=12,572 width=42) (actual time=2,348.155..2,348.155 rows=20,000 loops=1)

  • Buckets: 32768 (originally 16384) Batches: 1 (originally 1) Memory Usage: 1819kB
12. 1,287.111 2,325.348 ↓ 1.6 20,000 1

HashAggregate (cost=30,332.53..30,458.25 rows=12,572 width=42) (actual time=2,304.738..2,325.348 rows=20,000 loops=1)

  • Group Key: t4._fld567rref, t4._fld568rref
13. 1,038.237 1,038.237 ↑ 1.0 1,070,457 1

Seq Scan on _inforg566 t4 (cost=0.00..27,118.02 rows=1,071,502 width=42) (actual time=0.007..1,038.237 rows=1,070,457 loops=1)

  • Filter: _active
14. 200.000 200.000 ↑ 1.0 1 20,000

Index Scan using _inforg566_4 on _inforg566 t6 (cost=0.22..4.24 rows=1 width=65) (actual time=0.008..0.010 rows=1 loops=20,000)

  • Index Cond: ((_fld567rref = t4._fld567rref) AND (_period = (max(t4._period))) AND (_recorderrref = (max(t5._recorderrref))))
  • Filter: (t4._fld568rref = _fld568rref)
Planning time : 2.358 ms
Execution time : 5,431.269 ms