explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vntf

Settings
# exclusive inclusive rows x rows loops node
1. 0.070 4,808.675 ↑ 1.0 1,000 1

Limit (cost=1,860,609.95..1,860,610.95 rows=1,000 width=161) (actual time=4,808.533..4,808.675 rows=1,000 loops=1)

2. 32.309 4,808.605 ↑ 10.9 1,000 1

Sort (cost=1,860,609.95..1,860,620.84 rows=10,890 width=161) (actual time=4,808.531..4,808.605 rows=1,000 loops=1)

  • Sort Key: (COALESCE(t4._fld55072, false)) DESC, (max(t1._fld54554)), (COALESCE(t18._enumorder, '0'::numeric))
  • Sort Method: top-N heapsort Memory: 208kB
3. 80.368 4,776.296 ↓ 11.6 126,221 1

GroupAggregate (cost=1,860,142.42..1,860,371.11 rows=10,890 width=161) (actual time=4,660.991..4,776.296 rows=126,221 loops=1)

  • Group Key: t1._document1055_idrref, t4._date_time, t4._fld38471rref, t4._fld38477rref, t17._fld54602rref, ((t4._fld38491)::mvarchar(1024)), (COALESCE(t4._fld55072, false)), (COALESCE(t18._enumorder, '0'::numeric))
4. 193.177 4,695.928 ↓ 15.7 170,579 1

Sort (cost=1,860,142.42..1,860,153.31 rows=10,890 width=161) (actual time=4,660.975..4,695.928 rows=170,579 loops=1)

  • Sort Key: t1._document1055_idrref, t4._date_time, t4._fld38471rref, t4._fld38477rref, t17._fld54602rref, ((t4._fld38491)::mvarchar(1024)), (COALESCE(t4._fld55072, false)) DESC, (COALESCE(t18._enumorder, '0'::numeric))
  • Sort Method: quicksort Memory: 35055kB
5. 196.691 4,502.751 ↓ 15.7 170,579 1

Nested Loop Semi Join (cost=2.49..1,859,850.34 rows=10,890 width=161) (actual time=0.764..4,502.751 rows=170,579 loops=1)

  • Join Filter: ((CASE WHEN (alternatives: SubPlan 8 or hashed SubPlan 9) THEN true ELSE false END = CASE WHEN (alternatives: SubPlan 10 or hashed SubPlan 11) THEN true ELSE false END) AND (CASE WHEN (SubPlan 12) THEN true ELSE false END = CASE WHEN (alternatives: SubPlan 13 or hashed SubPlan 14) THEN true ELSE false END))
6. 100.474 3,282.407 ↓ 3.9 170,579 1

Nested Loop Left Join (cost=1.58..1,374,711.28 rows=43,562 width=150) (actual time=0.459..3,282.407 rows=170,579 loops=1)

  • Join Filter: (t17._fld54602rref = t18._idrref)
  • Rows Removed by Join Filter: 317118
7. 82.529 3,181.933 ↓ 3.9 170,579 1

Nested Loop Left Join (cost=1.58..1,372,444.99 rows=43,562 width=146) (actual time=0.453..3,181.933 rows=170,579 loops=1)

8. 138.703 2,587.667 ↓ 3.9 170,579 1

Nested Loop Left Join (cost=1.41..1,363,882.77 rows=43,562 width=126) (actual time=0.443..2,587.667 rows=170,579 loops=1)

9. 74.741 2,107.806 ↓ 3.9 170,579 1

Nested Loop (cost=1.25..1,355,377.44 rows=43,562 width=150) (actual time=0.432..2,107.806 rows=170,579 loops=1)

10. 67.378 1,527.149 ↓ 4.3 126,479 1

Nested Loop (cost=1.08..1,345,733.68 rows=29,732 width=165) (actual time=0.421..1,527.149 rows=126,479 loops=1)

11. 84.839 1,080.334 ↓ 4.3 126,479 1

Nested Loop Semi Join (cost=0.91..1,337,055.88 rows=29,732 width=102) (actual time=0.411..1,080.334 rows=126,479 loops=1)

  • Join Filter: ((CASE WHEN (alternatives: SubPlan 1 or hashed SubPlan 2) THEN true ELSE false END = CASE WHEN (alternatives: SubPlan 3 or hashed SubPlan 4) THEN true ELSE false END) AND (CASE WHEN (SubPlan 5) THEN true ELSE false END = CASE WHEN (alternatives: SubPlan 6 or hashed SubPlan 7) THEN true ELSE false END))
  • Rows Removed by Join Filter: 1368
12. 109.594 109.594 ↓ 1.1 127,163 1

Seq Scan on _document1055 t4 (cost=0.00..12,644.23 rows=118,927 width=122) (actual time=0.009..109.594 rows=127,163 loops=1)

  • Filter: ((_fld38471rref <> '\\x80c400155dfadb3211e6aa35161c10bc'::bytea) AND (_fld38471rref <> '\\x80c400155dfadb3211e6aa35161c10bc'::bytea) AND (_fld1998 = '0'::numeric))
  • Rows Removed by Filter: 8855
13. 0.000 0.000 ↑ 1.0 1 127,163

Materialize (cost=0.91..10.84 rows=1 width=19) (actual time=0.000..0.000 rows=1 loops=127,163)

14. 0.007 0.215 ↓ 2.0 2 1

Nested Loop Semi Join (cost=0.91..10.84 rows=1 width=19) (actual time=0.095..0.215 rows=2 loops=1)

15. 0.000 0.048 ↑ 1.0 4 1

Nested Loop (cost=0.39..5.37 rows=4 width=38) (actual time=0.036..0.048 rows=4 loops=1)

16. 0.003 0.036 ↑ 1.0 4 1

Nested Loop (cost=0.33..5.07 rows=4 width=19) (actual time=0.031..0.036 rows=4 loops=1)

17. 0.020 0.020 ↑ 1.0 1 1

Index Only Scan using _reference185_byfieldfld5963 on _reference185 t5 (cost=0.16..2.38 rows=1 width=19) (actual time=0.020..0.020 rows=1 loops=1)

  • Index Cond: (_fld5963 = 'Документ.пр_ЗаданиеНаРаботу'::mvarchar)
  • Heap Fetches: 0
18. 0.013 0.013 ↑ 3.0 4 1

Index Only Scan using _inforg48096_bydims on _inforg48096 t7 (cost=0.16..2.57 rows=12 width=38) (actual time=0.010..0.013 rows=4 loops=1)

  • Index Cond: ((_fld1998 = '0'::numeric) AND (_fld48097rref = t5._idrref))
  • Heap Fetches: 0
19. 0.012 0.012 ↑ 1.0 1 4

Index Only Scan using _reference131hpk on _reference131 t6 (cost=0.06..0.08 rows=1 width=19) (actual time=0.003..0.003 rows=1 loops=4)

  • Index Cond: ((_fld1998 = '0'::numeric) AND (_idrref = t7._fld48098rref))
  • Heap Fetches: 1
20. 0.016 0.160 ↓ 0.0 0 4

Hash Join (cost=0.52..1.75 rows=1 width=19) (actual time=0.040..0.040 rows=0 loops=4)

  • Hash Cond: ((t9._fld47547_type = t8._fld4561_type) AND (t9._fld47547_rtref = t8._fld4561_rtref) AND (t9._fld47547_rrref = t8._fld4561_rrref))
21. 0.024 0.024 ↑ 1.2 4 4

Index Only Scan using _inforg47546_bydims47550_rr on _inforg47546 t9 (cost=0.11..1.31 rows=5 width=33) (actual time=0.006..0.006 rows=4 loops=4)

  • Index Cond: ((_fld1998 = '0'::numeric) AND (_fld47548_type = '\\x08'::bytea) AND (_fld47548_rtref = '\\x0000015b'::bytea) AND (_fld47548_rrref = '\\x80cd00155dfadb3211e7def0a260b5be'::bytea))
  • Heap Fetches: 0
22. 0.028 0.120 ↓ 4.1 41 4

Hash (cost=0.28..0.28 rows=10 width=49) (actual time=0.030..0.030 rows=41 loops=4)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
23. 0.092 0.092 ↓ 4.1 41 4

Index Scan using _reference131_vt4559_intkeyind on _reference131_vt4559 t8 (cost=0.11..0.28 rows=10 width=49) (actual time=0.008..0.023 rows=41 loops=4)

  • Index Cond: ((_fld1998 = '0'::numeric) AND (_reference131_idrref = t7._fld48098rref))
24.          

SubPlan (for Nested Loop Semi Join)

25. 0.000 0.000 ↓ 0.0 0

Index Only Scan using _inforg43964_bydims_rr on _inforg43964 t10 (cost=0.11..2.33 rows=1 width=0) (never executed)

  • Index Cond: ((_fld1998 = '0'::numeric) AND (_fld43965rref = t6._idrref) AND (_fld43966_type = '\\x08'::bytea) AND (_fld43966_rtref = '\\x00000110'::bytea) AND (_fld43966_rrref = t4._fld75496rref))
  • Heap Fetches: 0
26. 0.061 0.061 ↑ 1.0 91 1

Seq Scan on _inforg43964 t10_1 (cost=0.00..5.74 rows=91 width=38) (actual time=0.008..0.061 rows=91 loops=1)

  • Filter: ((_fld1998 = '0'::numeric) AND (_fld43966_type = '\\x08'::bytea) AND (_fld43966_rtref = '\\x00000110'::bytea))
  • Rows Removed by Filter: 120
27. 0.000 0.000 ↓ 0.0 0

Index Scan using _inforg43971_bydims_rr on _inforg43971 t11 (cost=0.11..2.33 rows=1 width=0) (never executed)

  • Index Cond: ((_fld1998 = '0'::numeric) AND (_fld43972rref = t6._idrref) AND (_fld43973_type = '\\x08'::bytea) AND (_fld43973_rtref = '\\x00000110'::bytea))
  • Filter: (NOT _fld43974)
28. 0.107 0.107 ↓ 7.4 89 1

Index Only Scan using _inforg43971_byresource43980_lrr on _inforg43971 t11_1 (cost=0.11..10.67 rows=12 width=19) (actual time=0.025..0.107 rows=89 loops=1)

  • Index Cond: ((_fld1998 = '0'::numeric) AND (_fld43974 = false) AND (_fld43973_type = '\\x08'::bytea) AND (_fld43973_rtref = '\\x00000110'::bytea))
  • Filter: (NOT _fld43974)
  • Heap Fetches: 80
29. 126.525 885.675 ↑ 1.0 1 126,525

Nested Loop (cost=0.27..4.13 rows=1 width=0) (actual time=0.007..0.007 rows=1 loops=126,525)

  • Join Filter: ((t12._fld43966_type = t13._fld43027_type) AND (t12._fld43966_rtref = t13._fld43027_rtref) AND (t12._fld43966_rrref = t13._fld43027_rrref))
  • Rows Removed by Join Filter: 0
30. 506.100 506.100 ↑ 1.0 1 126,525

Index Only Scan using _inforg43025_bydims_rrn on _inforg43025 t13 (cost=0.16..1.28 rows=1 width=33) (actual time=0.004..0.004 rows=1 loops=126,525)

  • Index Cond: ((_fld1998 = '0'::numeric) AND (_fld43026_type = '\\x08'::bytea) AND (_fld43026_rtref = '\\x00000134'::bytea) AND (_fld43026_rrref = t4._fld38471rref))
  • Heap Fetches: 0
31. 253.050 253.050 ↑ 2.0 1 126,525

Index Only Scan using _inforg43964_bydims_rr on _inforg43964 t12 (cost=0.11..2.82 rows=2 width=30) (actual time=0.002..0.002 rows=1 loops=126,525)

  • Index Cond: ((_fld1998 = '0'::numeric) AND (_fld43965rref = t6._idrref))
  • Heap Fetches: 957
32. 0.000 0.000 ↓ 0.0 0

Index Scan using _inforg43971_bydims_rr on _inforg43971 t14 (cost=0.11..2.33 rows=1 width=0) (never executed)

  • Index Cond: ((_fld1998 = '0'::numeric) AND (_fld43972rref = t6._idrref) AND (_fld43973_type = '\\x08'::bytea) AND (_fld43973_rtref = '\\x00000134'::bytea))
  • Filter: (NOT _fld43974)
33. 0.058 0.058 ↓ 1.9 23 1

Index Only Scan using _inforg43971_byresource43980_lrr on _inforg43971 t14_1 (cost=0.11..10.67 rows=12 width=19) (actual time=0.015..0.058 rows=23 loops=1)

  • Index Cond: ((_fld1998 = '0'::numeric) AND (_fld43974 = false) AND (_fld43973_type = '\\x08'::bytea) AND (_fld43973_rtref = '\\x00000134'::bytea))
  • Filter: (NOT _fld43974)
  • Heap Fetches: 19
34. 379.437 379.437 ↑ 1.0 1 126,479

Index Scan using _document1055hpk on _document1055 t2 (cost=0.17..0.29 rows=1 width=63) (actual time=0.003..0.003 rows=1 loops=126,479)

  • Index Cond: ((_fld1998 = '0'::numeric) AND (_idrref = t4._idrref))
35. 505.916 505.916 ↑ 3.0 1 126,479

Index Scan using _document1055_vt54551_intkeyind on _document1055_vt54551 t1 (cost=0.17..0.29 rows=3 width=31) (actual time=0.004..0.004 rows=1 loops=126,479)

  • Index Cond: ((_fld1998 = '0'::numeric) AND (_document1055_idrref = t2._idrref))
36. 341.158 341.158 ↓ 0.0 0 170,579

Index Only Scan using _inforgs75548_bydims on _inforgsl75548 t16 (cost=0.16..0.19 rows=1 width=21) (actual time=0.002..0.002 rows=0 loops=170,579)

  • Index Cond: ((_fld1998 = '0'::numeric) AND (_fld55477rref = t4._fld38469rref) AND (_fld55586 = t4._fld54715))
  • Heap Fetches: 47821
37. 511.737 511.737 ↑ 1.0 1 170,579

Index Scan using _inforg54600_bydims_r on _inforg54600 t17 (cost=0.17..0.20 rows=1 width=40) (actual time=0.003..0.003 rows=1 loops=170,579)

  • Index Cond: ((_fld1998 = '0'::numeric) AND (_fld54601rref = t1._document1055_idrref))
38. 0.000 0.000 ↑ 1.7 3 170,579

Materialize (cost=0.00..1.06 rows=5 width=24) (actual time=0.000..0.000 rows=3 loops=170,579)

39. 0.004 0.004 ↑ 1.0 5 1

Seq Scan on _enum1899 t18 (cost=0.00..1.05 rows=5 width=24) (actual time=0.002..0.004 rows=5 loops=1)

40. 0.000 0.000 ↑ 1.0 1 170,579

Materialize (cost=0.91..10.84 rows=1 width=19) (actual time=0.000..0.000 rows=1 loops=170,579)

41. 0.002 0.046 ↑ 1.0 1 1

Nested Loop Semi Join (cost=0.91..10.84 rows=1 width=19) (actual time=0.046..0.046 rows=1 loops=1)

42. 0.001 0.011 ↑ 4.0 1 1

Nested Loop (cost=0.39..5.37 rows=4 width=38) (actual time=0.011..0.011 rows=1 loops=1)

43. 0.002 0.009 ↑ 4.0 1 1

Nested Loop (cost=0.33..5.07 rows=4 width=19) (actual time=0.009..0.009 rows=1 loops=1)

44. 0.004 0.004 ↑ 1.0 1 1

Index Only Scan using _reference185_byfieldfld5963 on _reference185 t19 (cost=0.16..2.38 rows=1 width=19) (actual time=0.004..0.004 rows=1 loops=1)

  • Index Cond: (_fld5963 = 'Документ.пр_ЗаданиеНаРаботу'::mvarchar)
  • Heap Fetches: 0
45. 0.003 0.003 ↑ 12.0 1 1

Index Only Scan using _inforg48096_bydims on _inforg48096 t21 (cost=0.16..2.57 rows=12 width=38) (actual time=0.003..0.003 rows=1 loops=1)

  • Index Cond: ((_fld1998 = '0'::numeric) AND (_fld48097rref = t19._idrref))
  • Heap Fetches: 0
46. 0.001 0.001 ↑ 1.0 1 1

Index Only Scan using _reference131hpk on _reference131 t20 (cost=0.06..0.08 rows=1 width=19) (actual time=0.001..0.001 rows=1 loops=1)

  • Index Cond: ((_fld1998 = '0'::numeric) AND (_idrref = t21._fld48098rref))
  • Heap Fetches: 0
47. 0.005 0.033 ↑ 1.0 1 1

Hash Join (cost=0.52..1.75 rows=1 width=19) (actual time=0.033..0.033 rows=1 loops=1)

  • Hash Cond: ((t23._fld47547_type = t22._fld4561_type) AND (t23._fld47547_rtref = t22._fld4561_rtref) AND (t23._fld47547_rrref = t22._fld4561_rrref))
48. 0.005 0.005 ↑ 2.5 2 1

Index Only Scan using _inforg47546_bydims47550_rr on _inforg47546 t23 (cost=0.11..1.31 rows=5 width=33) (actual time=0.004..0.005 rows=2 loops=1)

  • Index Cond: ((_fld1998 = '0'::numeric) AND (_fld47548_type = '\\x08'::bytea) AND (_fld47548_rtref = '\\x0000015b'::bytea) AND (_fld47548_rrref = '\\x80cd00155dfadb3211e7def0a260b5be'::bytea))
  • Heap Fetches: 0
49. 0.012 0.023 ↓ 4.6 46 1

Hash (cost=0.28..0.28 rows=10 width=49) (actual time=0.023..0.023 rows=46 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
50. 0.011 0.011 ↓ 4.6 46 1

Index Scan using _reference131_vt4559_intkeyind on _reference131_vt4559 t22 (cost=0.11..0.28 rows=10 width=49) (actual time=0.005..0.011 rows=46 loops=1)

  • Index Cond: ((_fld1998 = '0'::numeric) AND (_reference131_idrref = t21._fld48098rref))
51.          

SubPlan (for Nested Loop Semi Join)

52. 0.000 0.000 ↓ 0.0 0

Index Only Scan using _inforg43964_bydims_rr on _inforg43964 t24 (cost=0.11..2.33 rows=1 width=0) (never executed)

  • Index Cond: ((_fld1998 = '0'::numeric) AND (_fld43965rref = t20._idrref) AND (_fld43966_type = '\\x08'::bytea) AND (_fld43966_rtref = '\\x00000110'::bytea) AND (_fld43966_rrref = t2._fld75496rref))
  • Heap Fetches: 0
53. 0.048 0.048 ↑ 1.0 91 1

Seq Scan on _inforg43964 t24_1 (cost=0.00..5.74 rows=91 width=38) (actual time=0.005..0.048 rows=91 loops=1)

  • Filter: ((_fld1998 = '0'::numeric) AND (_fld43966_type = '\\x08'::bytea) AND (_fld43966_rtref = '\\x00000110'::bytea))
  • Rows Removed by Filter: 120
54. 0.000 0.000 ↓ 0.0 0

Index Scan using _inforg43971_bydims_rr on _inforg43971 t25 (cost=0.11..2.33 rows=1 width=0) (never executed)

  • Index Cond: ((_fld1998 = '0'::numeric) AND (_fld43972rref = t20._idrref) AND (_fld43973_type = '\\x08'::bytea) AND (_fld43973_rtref = '\\x00000110'::bytea))
  • Filter: (NOT _fld43974)
55. 0.073 0.073 ↓ 7.4 89 1

Index Only Scan using _inforg43971_byresource43980_lrr on _inforg43971 t25_1 (cost=0.11..10.67 rows=12 width=19) (actual time=0.016..0.073 rows=89 loops=1)

  • Index Cond: ((_fld1998 = '0'::numeric) AND (_fld43974 = false) AND (_fld43973_type = '\\x08'::bytea) AND (_fld43973_rtref = '\\x00000110'::bytea))
  • Filter: (NOT _fld43974)
  • Heap Fetches: 80
56. 0.000 1,023.474 ↑ 1.0 1 170,579

Nested Loop (cost=0.27..4.13 rows=1 width=0) (actual time=0.006..0.006 rows=1 loops=170,579)

  • Join Filter: ((t26._fld43966_type = t27._fld43027_type) AND (t26._fld43966_rtref = t27._fld43027_rtref) AND (t26._fld43966_rrref = t27._fld43027_rrref))
  • Rows Removed by Join Filter: 0
57. 682.316 682.316 ↑ 1.0 1 170,579

Index Only Scan using _inforg43025_bydims_rrn on _inforg43025 t27 (cost=0.16..1.28 rows=1 width=33) (actual time=0.004..0.004 rows=1 loops=170,579)

  • Index Cond: ((_fld1998 = '0'::numeric) AND (_fld43026_type = '\\x08'::bytea) AND (_fld43026_rtref = '\\x00000134'::bytea) AND (_fld43026_rrref = t2._fld38471rref))
  • Heap Fetches: 0
58. 341.158 341.158 ↑ 2.0 1 170,579

Index Only Scan using _inforg43964_bydims_rr on _inforg43964 t26 (cost=0.11..2.82 rows=2 width=30) (actual time=0.001..0.002 rows=1 loops=170,579)

  • Index Cond: ((_fld1998 = '0'::numeric) AND (_fld43965rref = t20._idrref))
  • Heap Fetches: 1280
59. 0.000 0.000 ↓ 0.0 0

Index Scan using _inforg43971_bydims_rr on _inforg43971 t28 (cost=0.11..2.33 rows=1 width=0) (never executed)

  • Index Cond: ((_fld1998 = '0'::numeric) AND (_fld43972rref = t20._idrref) AND (_fld43973_type = '\\x08'::bytea) AND (_fld43973_rtref = '\\x00000134'::bytea))
  • Filter: (NOT _fld43974)
60. 0.058 0.058 ↓ 1.9 23 1

Index Only Scan using _inforg43971_byresource43980_lrr on _inforg43971 t28_1 (cost=0.11..10.67 rows=12 width=19) (actual time=0.014..0.058 rows=23 loops=1)

  • Index Cond: ((_fld1998 = '0'::numeric) AND (_fld43974 = false) AND (_fld43973_type = '\\x08'::bytea) AND (_fld43973_rtref = '\\x00000134'::bytea))
  • Filter: (NOT _fld43974)
  • Heap Fetches: 19