explain.depesz.com

PostgreSQL's explain analyze made readable

Result: DVVj

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 324.671 ↑ 1.0 2 1

Unique (cost=685,163.52..685,163.56 rows=2 width=60) (actual time=324.670..324.671 rows=2 loops=1)

  • Buffers: shared hit=217114, local hit=1
2. 0.026 324.671 ↑ 1.0 2 1

Sort (cost=685,163.52..685,163.52 rows=2 width=60) (actual time=324.670..324.671 rows=2 loops=1)

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

Nested Loop Left Join (cost=1.88..685,163.51 rows=2 width=60) (actual time=320.745..324.645 rows=2 loops=1)

  • Join Filter: ((t1._fld13664rref = t3._fld11564rref) AND (t1._fld13665_type = CASE WHEN (t3._fld11565rref IS NOT NULL) THEN '\\010'::bytea ELSE NULL::bytea END) AND (t1._fld13665_rtref = CASE WHEN (t3._fld11565rref IS NOT NULL) THEN '\\000\\00 (...)
  • Rows Removed by Join Filter: 29202
  • Buffers: shared hit=217114, local hit=1
4. 0.005 0.050 ↑ 1.0 2 1

Nested Loop (cost=1.45..12.44 rows=2 width=58) (actual time=0.034..0.050 rows=2 loops=1)

  • Buffers: shared hit=7, local hit=1
5. 0.003 0.017 ↑ 1.0 2 1

Unique (cost=1.03..1.04 rows=2 width=17) (actual time=0.014..0.017 rows=2 loops=1)

  • Buffers: local hit=1
6. 0.009 0.014 ↑ 1.0 2 1

Sort (cost=1.03..1.03 rows=2 width=17) (actual time=0.013..0.014 rows=2 loops=1)

  • Sort Key: t13._q_000_f_000rref
  • Sort Method: quicksort Memory: 25kB
  • Buffers: local hit=1
7. 0.005 0.005 ↑ 1.0 2 1

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

  • Buffers: local hit=1
8. 0.028 0.028 ↑ 1.0 1 2

Index Only Scan using _inforg13662_byresource13669_rrrr on _inforg13662 t1 (cost=0.42..5.69 rows=1 width=75) (actual time=0.013..0.014 rows=1 loops=2)

  • Index Cond: ((_fld717 = '0'::numeric) AND (_fld13666rref = t13._q_000_f_000rref))
  • Heap Fetches: 0
  • Buffers: shared hit=7
9. 5.448 316.384 ↓ 2.0 14,601 2

Materialize (cost=0.43..684,808.50 rows=7,212 width=68) (actual time=0.228..158.192 rows=14,601 loops=2)

  • Buffers: shared hit=217107
10. 18.856 310.936 ↓ 2.0 14,601 1

Index Scan using "_document375_dateStart" on _document375 t3 (cost=0.43..684,772.44 rows=7,212 width=68) (actual time=0.454..310.936 rows=14,601 loops=1)

  • Index Cond: ((_fld717 = '0'::numeric) AND (_fld11568 = '2019-05-01 00:00:00'::timestamp without time zone))
  • Filter: ((NOT _marked) AND (SubPlan 4))
  • Rows Removed by Filter: 3
  • Buffers: shared hit=217107
11.          

SubPlan (forIndex Scan)

12. 14.604 292.080 ↑ 1.0 1 14,604

Nested Loop Semi Join (cost=13.11..46.11 rows=1 width=0) (actual time=0.020..0.020 rows=1 loops=14,604)

  • 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)
  • Rows Removed by Join Filter: 0
  • Buffers: shared hit=209526
13. 14.604 73.020 ↑ 1.0 1 14,604

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

  • Filter: (CASE WHEN (t4._fld3020rref IS NULL) THEN '\\001'::bytea ELSE CASE WHEN (t4._fld3020rref IS NOT NULL) THEN '\\010'::bytea ELSE NULL::bytea END END <> '\\001'::bytea)
  • Buffers: shared hit=58501
14. 0.000 0.000 ↑ 1.0 1 14,604

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

15. 58.416 58.416 ↑ 1.0 1 14,604

Index Scan using _reference124hpk on _reference124 t4 (cost=0.42..7.44 rows=1 width=17) (actual time=0.004..0.004 rows=1 loops=14,604)

  • Index Cond: ((_fld717 = '0'::numeric) AND (t3._fld11565rref = _idrref))
  • Buffers: shared hit=58501
16. 0.000 0.000 ↑ 1.0 1 14,604

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

  • Buffers: shared hit=31
17. 0.002 0.289 ↑ 1.0 1 1

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

  • Buffers: shared hit=31
18. 0.002 0.245 ↑ 1.0 1 1

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

  • Buffers: shared hit=27
19. 0.093 0.093 ↑ 1.0 1 1

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

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

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

  • Buffers: shared hit=20
21. 0.006 0.088 ↓ 3.0 3 1

HashAggregate (cost=11.59..11.60 rows=1 width=19) (actual time=0.087..0.088 rows=3 loops=1)

  • Group Key: t8._reference73_idrref
  • Buffers: shared hit=10
22. 0.005 0.082 ↓ 3.0 3 1

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

  • Buffers: shared hit=10
23. 0.023 0.023 ↑ 1.0 2 1

Index Only Scan using _inforg14726_bydims14730_rr on _inforg14726 t9 (cost=0.28..3.83 rows=2 width=24) (actual time=0.022..0.023 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\\021\\347 (...)
  • Heap Fetches: 0
  • Buffers: shared hit=3
24. 0.054 0.054 ↑ 1.5 2 2

Index Only Scan using _reference73_vt2103_byfield2106_rr on _reference73_vt2103 t8 (cost=0.28..3.85 rows=3 width=49) (actual time=0.025..0.027 rows=2 loops=2)

  • Index Cond: ((_fld717 = '0'::numeric) AND (_fld2105_type = t9._fld14727_type) AND (_fld2105_rtref = t9._fld14727_rtref) AND (_fld2105_rrref = t9._fld14727_rrref))
  • Heap Fetches: 2
  • Buffers: shared hit=7
25. 0.057 0.057 ↓ 0.0 0 3

Index Only Scan using _inforg14845_bydims14850_rr on _inforg14845 t6 (cost=0.42..3.94 rows=1 width=38) (actual time=0.019..0.019 rows=0 loops=3)

  • Index Cond: ((_fld717 = '0'::numeric) AND (_fld14847rref = t8._reference73_idrref) AND (_fld14846rref = t7._idrref))
  • Heap Fetches: 0
  • Buffers: shared hit=10
26. 0.042 0.042 ↑ 1.0 1 1

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

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

SubPlan (forNested Loop Semi Join)

28. 14.604 160.644 ↑ 1.0 1 14,604

Nested Loop (cost=0.83..11.39 rows=1 width=0) (actual time=0.011..0.011 rows=1 loops=14,604)

  • Buffers: shared hit=107181
29. 87.624 87.624 ↑ 1.0 1 14,604

Index Only Scan using _inforg13761_bydims_rrn on _inforg13761 t11 (cost=0.42..7.45 rows=1 width=24) (actual time=0.006..0.006 rows=1 loops=14,604)

  • Index Cond: ((_fld717 = '0'::numeric) AND (_fld13762_type = CASE WHEN (t4._fld3020rref IS NOT NULL) THEN '\\010'::bytea ELSE NULL::bytea END) AND (_fld13762_rtref = CASE WHEN (t4._fld3020rref IS NOT NULL) THE (...)
  • Heap Fetches: 4766
  • Buffers: shared hit=48767
30. 58.416 58.416 ↑ 1.0 1 14,604

Index Only Scan using _inforg13931_bydims13935_rr on _inforg13931 t10 (cost=0.41..3.93 rows=1 width=27) (actual time=0.004..0.004 rows=1 loops=14,604)

  • Index Cond: ((_fld717 = '0'::numeric) AND (_fld13933_type = t11._fld13763_type) AND (_fld13933_rtref = t11._fld13763_rtref) AND (_fld13933_rrref = t11._fld13763_rrref) AND (_fld13932rref = t5._idrref))
  • Heap Fetches: 14601
  • Buffers: shared hit=58414
31. 43.812 43.812 ↑ 1.0 1 14,604

Index Only Scan using _inforg13938_byresource13945_lrr on _inforg13938 t12 (cost=0.41..3.93 rows=1 width=0) (actual time=0.003..0.003 rows=1 loops=14,604)

  • Index Cond: ((_fld717 = '0'::numeric) AND (_fld13941 = false) AND (_fld13939rref = t5._idrref) AND (_fld13940_type = CASE WHEN (t4._fld3020rref IS NOT NULL) THEN '\\010'::bytea ELSE NULL::bytea END) AND (_fld13940_ (...)
  • Filter: (NOT _fld13941)
  • Heap Fetches: 0
  • Buffers: shared hit=43813
32. 0.000 0.000 ↓ 0.0 0

Index Only Scan using _inforg13938_byresource13945_lrr on _inforg13938 t12_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
Planning time : 76.958 ms
Execution time : 324.970 ms