explain.depesz.com

PostgreSQL's explain analyze made readable

Result: joZP

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 432,709.745 ↑ 1.0 2 1

Unique (cost=34,944,762.96..34,944,763.00 rows=2 width=60) (actual time=432,709.744..432,709.745 rows=2 loops=1)

  • Buffers: shared hit=209534, local hit=1
2. 0.049 432,709.744 ↑ 1.0 2 1

Sort (cost=34,944,762.96..34,944,762.96 rows=2 width=60) (actual time=432,709.744..432,709.744 rows=2 loops=1)

  • Sort Key: t3._fld13664rref, t3._fld13665_type, t3._fld13665_rtref, t3._fld13665_rrref, t5._idrref, (CASE WHEN (t5._idrref IS NULL) THEN false ELSE true END), (CASE WHEN (t5._idrref IS NULL) THEN true ELSE false END)
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=209534, local hit=1
3. 21.556 432,709.695 ↑ 1.0 2 1

Merge Semi Join (cost=8,018,489.12..34,944,762.95 rows=2 width=60) (actual time=99,648.881..432,709.695 rows=2 loops=1)

  • Merge Cond: (t3._fld13666rref = t15._q_000_f_000rref)
  • Buffers: shared hit=209529, local hit=1
4. 370,821.678 432,688.117 ↑ 1.5 151,080 1

Nested Loop Left Join (cost=0.42..54,178,170.71 rows=231,695 width=75) (actual time=727.230..432,688.117 rows=151,080 loops=1)

  • Join Filter: ((t3._fld13664rref = t5._fld11564rref) AND (t3._fld13665_type = CASE WHEN (t5._fld11565rref IS NOT NULL) THEN '\\010'::bytea ELSE NULL::bytea END) AND (t3._fld13665_rtref = CASE WHEN (t5._fld11565rref IS NOT NULL) THEN '\\0 (...)
  • Rows Removed by Join Filter: 1743160282
  • Buffers: shared hit=209529
5. 74.719 74.719 ↑ 1.5 151,080 1

Index Only Scan using _inforg13662_byresource13669_rrrr on _inforg13662 t3 (cost=0.42..16,257.02 rows=231,695 width=75) (actual time=0.080..74.719 rows=151,080 loops=1)

  • Index Cond: (_fld717 = '0'::numeric)
  • Heap Fetches: 6680
  • Buffers: shared hit=2359
6. 61,072.375 61,791.720 ↓ 11,538.0 11,538 151,080

Materialize (cost=0.00..54,156,121.32 rows=1 width=68) (actual time=0.003..0.409 rows=11,538 loops=151,080)

  • Buffers: shared hit=207170
7. 500.123 719.345 ↓ 11,538.0 11,538 1

Seq Scan on _document375 t5 (cost=0.00..54,156,121.31 rows=1 width=68) (actual time=460.362..719.345 rows=11,538 loops=1)

  • Filter: ((NOT _marked) AND (_fld717 = '0'::numeric) AND (_fld11568 = '2019-05-01 00:00:00'::timestamp without time zone) AND ((((((('2000-01-01 00:00:00'::timestamp without time zone + (((((date_part('YEAR'::text, _fld11569) (...)
  • Rows Removed by Filter: 1167488
  • Buffers: shared hit=207170
8.          

SubPlan (forSeq Scan)

9. 11.538 219.222 ↑ 1.0 1 11,538

Nested Loop Semi Join (cost=13.11..46.11 rows=1 width=0) (actual time=0.019..0.019 rows=1 loops=11,538)

  • Join Filter: (CASE WHEN (SubPlan 1) THEN true ELSE false END = CASE WHEN (alternatives: SubPlan 2 or hashed SubPlan 3) THEN true ELSE false END)
  • Buffers: shared hit=165667
10. 11.538 57.690 ↑ 1.0 1 11,538

Nested Loop Left Join (cost=0.42..7.47 rows=1 width=17) (actual time=0.005..0.005 rows=1 loops=11,538)

  • Filter: (CASE WHEN (t6._fld3020rref IS NULL) THEN '\\001'::bytea ELSE CASE WHEN (t6._fld3020rref IS NOT NULL) THEN '\\010'::bytea ELSE NULL::bytea END END <> '\\001'::bytea)
  • Buffers: shared hit=46221
11. 0.000 0.000 ↑ 1.0 1 11,538

Result (cost=0.00..0.01 rows=1 width=4) (actual time=0.000..0.000 rows=1 loops=11,538)

12. 46.152 46.152 ↑ 1.0 1 11,538

Index Scan using _reference124hpk on _reference124 t6 (cost=0.42..7.44 rows=1 width=17) (actual time=0.004..0.004 rows=1 loops=11,538)

  • Index Cond: ((_fld717 = '0'::numeric) AND (t5._fld11565rref = _idrref))
  • Buffers: shared hit=46221
13. 0.000 0.000 ↑ 1.0 1 11,538

Materialize (cost=12.69..23.29 rows=1 width=17) (actual time=0.000..0.000 rows=1 loops=11,538)

  • Buffers: shared hit=25
14. 0.003 0.222 ↑ 1.0 1 1

Nested Loop (cost=12.69..23.29 rows=1 width=17) (actual time=0.222..0.222 rows=1 loops=1)

  • Buffers: shared hit=25
15. 0.003 0.192 ↑ 1.0 1 1

Nested Loop (cost=12.42..22.99 rows=1 width=38) (actual time=0.192..0.192 rows=1 loops=1)

  • Buffers: shared hit=21
16. 0.091 0.091 ↑ 1.0 1 1

Index Only Scan using _reference105_byfield2798_sr on _reference105 t9 (cost=0.41..7.42 rows=1 width=20) (actual time=0.091..0.091 rows=1 loops=1)

  • Index Cond: (_fld2789 = 'Документ.СверкаВзаиморасчетов'::mvarchar)
  • Heap Fetches: 0
  • Buffers: shared hit=7
17. 0.009 0.098 ↑ 1.0 1 1

Nested Loop (cost=12.01..15.55 rows=1 width=57) (actual time=0.098..0.098 rows=1 loops=1)

  • Buffers: shared hit=14
18. 0.007 0.066 ↑ 1.0 1 1

HashAggregate (cost=11.59..11.60 rows=1 width=19) (actual time=0.066..0.066 rows=1 loops=1)

  • Group Key: t10._reference73_idrref
  • Buffers: shared hit=10
19. 0.005 0.059 ↓ 3.0 3 1

Nested Loop (cost=0.56..11.59 rows=1 width=19) (actual time=0.057..0.059 rows=3 loops=1)

  • Buffers: shared hit=10
20. 0.016 0.016 ↑ 1.0 2 1

Index Only Scan using _inforg14726_bydims14730_rr on _inforg14726 t11 (cost=0.28..3.83 rows=2 width=24) (actual time=0.016..0.016 rows=2 loops=1)

  • Index Cond: ((_fld717 = '0'::numeric) AND (_fld14728_type = '\\010'::bytea) AND (_fld14728_rtref = '\\000\\000\\000\\254'::bytea) AND (_fld14728_rrref = 'P\\2140Z:wL\\341\\02 (...)
  • Heap Fetches: 0
  • Buffers: shared hit=3
21. 0.038 0.038 ↑ 1.5 2 2

Index Only Scan using _reference73_vt2103_byfield2106_rr on _reference73_vt2103 t10 (cost=0.28..3.85 rows=3 width=49) (actual time=0.018..0.019 rows=2 loops=2)

  • Index Cond: ((_fld717 = '0'::numeric) AND (_fld2105_type = t11._fld14727_type) AND (_fld2105_rtref = t11._fld14727_rtref) AND (_fld2105_rrref = t11._fld14727_rrref))
  • Heap Fetches: 2
  • Buffers: shared hit=7
22. 0.023 0.023 ↑ 1.0 1 1

Index Only Scan using _inforg14845_bydims14850_rr on _inforg14845 t8 (cost=0.42..3.94 rows=1 width=38) (actual time=0.023..0.023 rows=1 loops=1)

  • Index Cond: ((_fld717 = '0'::numeric) AND (_fld14847rref = t10._reference73_idrref) AND (_fld14846rref = t9._idrref))
  • Heap Fetches: 0
  • Buffers: shared hit=4
23. 0.027 0.027 ↑ 1.0 1 1

Index Only Scan using _reference73hpk on _reference73 t7 (cost=0.27..0.29 rows=1 width=17) (actual time=0.027..0.027 rows=1 loops=1)

  • Index Cond: ((_fld717 = '0'::numeric) AND (_idrref = t8._fld14847rref))
  • Heap Fetches: 1
  • Buffers: shared hit=4
24.          

SubPlan (forNested Loop Semi Join)

25. 11.538 115.380 ↑ 1.0 1 11,538

Nested Loop (cost=0.83..11.39 rows=1 width=0) (actual time=0.010..0.010 rows=1 loops=11,538)

  • Buffers: shared hit=84806
26. 57.690 57.690 ↑ 1.0 1 11,538

Index Only Scan using _inforg13761_bydims_rrn on _inforg13761 t13 (cost=0.42..7.45 rows=1 width=24) (actual time=0.005..0.005 rows=1 loops=11,538)

  • Index Cond: ((_fld717 = '0'::numeric) AND (_fld13762_type = CASE WHEN (t6._fld3020rref IS NOT NULL) THEN '\\010'::bytea ELSE NULL::bytea END) AND (_fld13762_rtref = CASE WHEN (t6._fld3020rref IS NOT NUL (...)
  • Heap Fetches: 3894
  • Buffers: shared hit=38653
27. 46.152 46.152 ↑ 1.0 1 11,538

Index Only Scan using _inforg13931_bydims13935_rr on _inforg13931 t12 (cost=0.41..3.93 rows=1 width=27) (actual time=0.004..0.004 rows=1 loops=11,538)

  • Index Cond: ((_fld717 = '0'::numeric) AND (_fld13933_type = t13._fld13763_type) AND (_fld13933_rtref = t13._fld13763_rtref) AND (_fld13933_rrref = t13._fld13763_rrref) AND (_fld13932rref = t7._idrref))
  • Heap Fetches: 11538
  • Buffers: shared hit=46153
28. 34.614 34.614 ↑ 1.0 1 11,538

Index Only Scan using _inforg13938_byresource13945_lrr on _inforg13938 t14 (cost=0.41..3.93 rows=1 width=0) (actual time=0.003..0.003 rows=1 loops=11,538)

  • Index Cond: ((_fld717 = '0'::numeric) AND (_fld13941 = false) AND (_fld13939rref = t7._idrref) AND (_fld13940_type = CASE WHEN (t6._fld3020rref IS NOT NULL) THEN '\\010'::bytea ELSE NULL::bytea END) AND (_fld (...)
  • Filter: (NOT _fld13941)
  • Heap Fetches: 0
  • Buffers: shared hit=34615
29. 0.000 0.000 ↓ 0.0 0

Index Only Scan using _inforg13938_byresource13945_lrr on _inforg13938 t14_1 (cost=0.41..199.45 rows=1,027 width=24) (never executed)

  • Index Cond: ((_fld717 = '0'::numeric) AND (_fld13941 = false))
  • Filter: (NOT _fld13941)
  • Heap Fetches: 0
30. 0.016 0.022 ↑ 1.0 2 1

Sort (cost=1.03..1.03 rows=2 width=17) (actual time=0.019..0.022 rows=2 loops=1)

  • Sort Key: t15._q_000_f_000rref
  • Sort Method: quicksort Memory: 25kB
  • Buffers: local hit=1
31. 0.006 0.006 ↑ 1.0 2 1

Seq Scan on tt999 t15 (cost=0.00..1.02 rows=2 width=17) (actual time=0.005..0.006 rows=2 loops=1)

  • Buffers: local hit=1