explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FKPO

Settings
# exclusive inclusive rows x rows loops node
1. 1.563 428,611.355 ↑ 5,682.7 746 1

Group (cost=7,236,646.53..11,287,551.35 rows=4,239,326 width=56) (actual time=410,455.255..428,611.355 rows=746 loops=1)

  • Group Key: history_1.c_createddate, history_1.c_actiontype, history_1.c_modifiedby, history_1.c_tablegroupid, history_1.c_createdby, history_1.c_datastoresid, history_1.c_canrestore
  • Buffers: shared hit=58702 read=43884, temp read=219134 written=219832
2. 10,135.510 428,609.792 ↑ 21,464.9 1,185 1

Gather Merge (cost=7,236,646.53..10,842,422.12 rows=25,435,956 width=56) (actual time=410,455.237..428,609.792 rows=1,185 loops=1)

  • Workers Planned: 6
  • Workers Launched: 6
  • Buffers: shared hit=235984 read=481777, temp read=1525823 written=1530684
3. 4,942.521 418,474.282 ↑ 25,084.8 169 7 / 7

Group (cost=7,235,646.43..7,750,017.97 rows=4,239,326 width=56) (actual time=406,192.498..418,474.282 rows=169 loops=7)

  • Group Key: history_1.c_createddate, history_1.c_actiontype, history_1.c_modifiedby, history_1.c_tablegroupid, history_1.c_createdby, history_1.c_datastoresid, history_1.c_canrestore
  • Buffers: shared hit=235984 read=481777, temp read=1525823 written=1530684
4. 381,422.717 413,531.761 ↑ 4.2 6,099,179 7 / 7

Sort (cost=7,235,646.43..7,299,942.87 rows=25,718,577 width=56) (actual time=406,192.472..413,531.761 rows=6,099,179 loops=7)

  • Sort Key: history_1.c_createddate, history_1.c_actiontype, history_1.c_modifiedby, history_1.c_tablegroupid, history_1.c_createdby, history_1.c_datastoresid, history_1.c_canrestore
  • Sort Method: external merge Disk: 371952kB
  • Buffers: shared hit=235984 read=481777, temp read=1525823 written=1530684
5. 10,321.358 32,109.044 ↑ 4.2 6,099,179 7 / 7

Hash Join (cost=33.95..1,495,794.93 rows=25,718,577 width=56) (actual time=0.605..32,109.044 rows=6,099,179 loops=7)

  • Buffers: shared hit=235816 read=481777
6. 9,674.244 21,787.302 ↑ 1.2 6,099,179 7 / 7

Append (cost=0..947,121.65 rows=7,065,542 width=64) (actual time=0.152..21,787.302 rows=6,099,179 loops=7)

  • Buffers: shared hit=235728 read=481777
7. 9,719.287 9,719.287 ↑ 1.2 4,050,790 7 / 7

Seq Scan on t_e20so1_document_boolean_history_tags history_1 (cost=0..605,023.37 rows=4,675,850 width=64) (actual time=0.555..9,719.287 rows=4,050,790 loops=7)

  • Filter: ((history_1.c_tablegroupid = ANY ('{e6c4fb96-c388-11e7-a223-5792b0fed8c4,c0b2f85c-bc93-466b-a54d-b1330440db98}'::uuid[])) AND ((history_1.c_canrestore = 1) OR (history_1.c_modifiedby IS NOT NULL)) AND (history_1.c_subactiontype <> 1) AND (history_1.c_actionfrom <> 11) AND (history_1.c_actiontype = ANY ('{7,8,11,12}'::integer[])))
  • Buffers: shared hit=653 read=481777
8. 2,393.771 2,393.771 ↓ 1.3 3,584,681 4 / 7

Seq Scan on t_e20so1_document_boolean_history_issues history (cost=0..306,770.57 rows=2,867,631 width=64) (actual time=0.039..4,189.099 rows=3,584,681 loops=4)

  • Filter: ((history.c_tablegroupid = ANY ('{e6c4fb96-c388-11e7-a223-5792b0fed8c4,c0b2f85c-bc93-466b-a54d-b1330440db98}'::uuid[])) AND ((history.c_canrestore = 1) OR (history.c_modifiedby IS NOT NULL)) AND (history.c_subactiontype <> 1) AND (history.c_actionfrom <> 11) AND (history.c_actiontype = ANY ('{7,8,11,12}'::integer[])))
  • Buffers: shared hit=235075
9. 0.118 0.384 ↑ 4.1 104 7 / 7

Hash (cost=28.6..28.6 rows=428 width=8) (actual time=0.382..0.384 rows=104 loops=7)

  • Buffers: shared hit=40
10. 0.159 0.266 ↓ 1.7 727 1 / 7

Append (cost=0.28..28.6 rows=428 width=8) (actual time=0.054..1.863 rows=727 loops=1)

  • Buffers: shared hit=40
11. 0.107 0.107 ↓ 1.7 727 1 / 7

Index Only Scan using t_e20so1_document_datastore_13_pkey on t_e20so1_document_datastore_13 documents (cost=0.28..26.46 rows=428 width=8) (actual time=0.052..0.748 rows=727 loops=1)

  • Index Cond: (documents.c_datastoresid = 13)
  • Heap Fetches: 158
  • Buffers: shared hit=40
Planning time : 18.853 ms
Execution time : 428,669.047 ms