explain.depesz.com

PostgreSQL's explain analyze made readable

Result: VGr1

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 0.393 ↑ 1.0 2 1

Unique (cost=663.06..663.10 rows=2 width=60) (actual time=0.392..0.393 rows=2 loops=1)

  • Buffers: shared hit=87, local hit=1
2. 0.018 0.392 ↑ 1.0 2 1

Sort (cost=663.06..663.07 rows=2 width=60) (actual time=0.392..0.392 rows=2 loops=1)

  • Sort Key: t2._fld13664rref, t2._fld13665_type, t2._fld13665_rtref, t2._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=87, local hit=1
3. 0.005 0.374 ↑ 1.0 2 1

Nested Loop (cost=0.85..663.05 rows=2 width=60) (actual time=0.084..0.374 rows=2 loops=1)

  • Join Filter: (t2._fld13664rref = t3._idrref)
  • Rows Removed by Join Filter: 2
  • Buffers: shared hit=87, local hit=1
4. 0.002 0.359 ↑ 1.0 2 1

Nested Loop Left Join (cost=0.85..661.96 rows=2 width=58) (actual time=0.071..0.359 rows=2 loops=1)

  • Buffers: shared hit=86, local hit=1
5. 0.005 0.039 ↑ 1.0 2 1

Nested Loop (cost=0.42..12.42 rows=2 width=41) (actual time=0.027..0.039 rows=2 loops=1)

  • Buffers: shared hit=7, local hit=1
6. 0.006 0.006 ↑ 1.0 2 1

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

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

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

  • Index Cond: ((_fld717 = '0'::numeric) AND (_fld13666rref = t1._q_000_f_000rref))
  • Heap Fetches: 0
  • Buffers: shared hit=7
8. 0.144 0.318 ↓ 0.0 0 2

Index Scan using _document375_byfield21396_rr on _document375 t5 (cost=0.43..324.76 rows=1 width=51) (actual time=0.139..0.159 rows=0 loops=2)

  • Index Cond: ((_fld717 = '0'::numeric) AND (t2._fld13665_rrref = _fld11565rref))
  • Filter: ((NOT _marked) AND (_fld11568 = '2019-05-01 00:00:00'::timestamp without time zone) AND (t2._fld13664rref = _fld11564rref) AND (t2._fld13665_type = CASE WHEN (_fld11565rref IS NOT NULL) THEN '\\010'::bytea ELSE NULL::bytea (...)
  • Rows Removed by Filter: 18
  • Buffers: shared hit=79
9.          

SubPlan (forIndex Scan)

10. 0.005 0.174 ↑ 1.0 1 1

Nested Loop Semi Join (cost=13.11..46.11 rows=1 width=0) (actual time=0.174..0.174 rows=1 loops=1)

  • 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=39
11. 0.002 0.018 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.42..7.47 rows=1 width=17) (actual time=0.018..0.018 rows=1 loops=1)

  • 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=4
12. 0.001 0.001 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=1)

13. 0.015 0.015 ↑ 1.0 1 1

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

  • Index Cond: ((_fld717 = '0'::numeric) AND (t5._fld11565rref = _idrref))
  • Buffers: shared hit=4
14. 0.002 0.100 ↑ 1.0 1 1

Materialize (cost=12.69..23.29 rows=1 width=17) (actual time=0.100..0.100 rows=1 loops=1)

  • Buffers: shared hit=22
15. 0.000 0.098 ↑ 1.0 1 1

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

  • Buffers: shared hit=22
16. 0.001 0.086 ↑ 1.0 1 1

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

  • Buffers: shared hit=18
17. 0.024 0.024 ↑ 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.024..0.024 rows=1 loops=1)

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

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

  • Buffers: shared hit=14
19. 0.005 0.046 ↑ 1.0 1 1

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

  • Group Key: t10._reference73_idrref
  • Buffers: shared hit=10
20. 0.002 0.041 ↓ 3.0 3 1

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

  • Buffers: shared hit=10
21. 0.013 0.013 ↑ 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.012..0.013 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
22. 0.026 0.026 ↑ 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.011..0.013 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
23. 0.013 0.013 ↑ 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.013..0.013 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
24. 0.012 0.012 ↑ 1.0 1 1

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

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

SubPlan (forNested Loop Semi Join)

26. 0.002 0.037 ↑ 1.0 1 1

Nested Loop (cost=0.83..11.39 rows=1 width=0) (actual time=0.037..0.037 rows=1 loops=1)

  • Buffers: shared hit=9
27. 0.019 0.019 ↑ 1.0 1 1

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

  • 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 NULL) THE (...)
  • Heap Fetches: 0
  • Buffers: shared hit=4
28. 0.016 0.016 ↑ 1.0 1 1

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

  • 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: 1
  • Buffers: shared hit=5
29. 0.014 0.014 ↑ 1.0 1 1

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

  • 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 (_fld13940_ (...)
  • Filter: (NOT _fld13941)
  • Heap Fetches: 0
  • Buffers: shared hit=4
30. 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
31. 0.003 0.010 ↑ 1.0 2 2

Materialize (cost=0.00..1.03 rows=2 width=17) (actual time=0.004..0.005 rows=2 loops=2)

  • Buffers: shared hit=1
32. 0.007 0.007 ↑ 1.0 2 1

Seq Scan on _reference148 t3 (cost=0.00..1.02 rows=2 width=17) (actual time=0.005..0.007 rows=2 loops=1)

  • Filter: (_fld717 = '0'::numeric)
  • Buffers: shared hit=1
Planning time : 73.623 ms
Execution time : 0.609 ms