explain.depesz.com

PostgreSQL's explain analyze made readable

Result: er9J : Entry_groups

Settings
# exclusive inclusive rows x rows loops node
1. 0.758 54.254 ↑ 1.0 29 1

Bitmap Heap Scan on entry_groups (cost=4.51..11,066.09 rows=29 width=810) (actual time=3.989..54.254 rows=29 loops=1)

  • Recheck Cond: (event_id = '0b8bd886-894f-11e9-8a9e-06091a8adce2'::uuid)
  • Filter: (deleted_at IS NULL)
  • Rows Removed by Filter: 1
  • Heap Blocks: exact=17
  • Buffers: shared hit=6578
2. 0.020 0.020 ↑ 1.0 30 1

Bitmap Index Scan on entry_group_idx (cost=0.00..4.50 rows=30 width=0) (actual time=0.020..0.020 rows=30 loops=1)

  • Index Cond: (event_id = '0b8bd886-894f-11e9-8a9e-06091a8adce2'::uuid)
  • Buffers: shared hit=2
3.          

SubPlan (forBitmap Heap Scan)

4. 0.638 0.638 ↑ 1.0 1 29

Index Scan using users_pkey on users (cost=0.27..8.29 rows=1 width=311) (actual time=0.021..0.022 rows=1 loops=29)

  • Index Cond: (user_id = entry_groups.user_id)
  • Buffers: shared hit=90
5. 4.553 49.822 ↑ 1.0 1 29

Aggregate (cost=304.34..304.35 rows=1 width=200) (actual time=1.718..1.718 rows=1 loops=29)

  • Buffers: shared hit=4787
6. 0.261 45.269 ↑ 1.8 5 29

Append (cost=46.19..304.29 rows=9 width=200) (actual time=0.397..1.561 rows=5 loops=29)

  • Buffers: shared hit=4787
7. 0.709 39.353 ↑ 1.0 4 29

Subquery Scan on d1 (cost=46.19..58.67 rows=4 width=200) (actual time=0.385..1.357 rows=4 loops=29)

  • Buffers: shared hit=2426
8. 3.054 6.380 ↑ 1.0 4 29

HashAggregate (cost=46.19..58.63 rows=4 width=290) (actual time=0.109..0.220 rows=4 loops=29)

  • Group Key: (entries.entry_details ->> 'reg_num'::text), entries.class_id, (entries.entry_details ->> 'name'::text)
  • Buffers: shared hit=575
9. 0.754 0.928 ↓ 1.6 11 29

Bitmap Heap Scan on entries (cost=4.37..46.02 rows=7 width=290) (actual time=0.013..0.032 rows=11 loops=29)

  • Recheck Cond: (entry_group_id = entry_groups.entry_group_id)
  • Filter: ((deleted_at IS NULL) AND (entry_type = 'BREEDING'::text))
  • Rows Removed by Filter: 6
  • Heap Blocks: exact=298
  • Buffers: shared hit=357
10. 0.174 0.174 ↓ 1.8 21 29

Bitmap Index Scan on entry_group_id (cost=0.00..4.37 rows=12 width=0) (actual time=0.006..0.006 rows=21 loops=29)

  • Index Cond: (entry_group_id = entry_groups.entry_group_id)
  • Buffers: shared hit=59
11.          

SubPlan (forHashAggregate)

12. 2.398 2.398 ↑ 1.0 1 109

Seq Scan on classes_2 (cost=0.00..3.08 rows=1 width=95) (actual time=0.015..0.022 rows=1 loops=109)

  • Filter: ("classID" = entries.class_id)
  • Rows Removed by Filter: 89
  • Buffers: shared hit=218
13.          

SubPlan (forSubquery Scan)

14. 30.084 32.264 ↑ 1.0 1 109

Aggregate (cost=12.26..12.27 rows=1 width=314) (actual time=0.295..0.296 rows=1 loops=109)

  • Buffers: shared hit=1851
15. 2.180 2.180 ↑ 3.3 3 109

Seq Scan on shows (cost=0.00..12.21 rows=10 width=314) (actual time=0.005..0.020 rows=3 loops=109)

  • Filter: (show_id = ANY (d1.shows))
  • Rows Removed by Filter: 97
  • Buffers: shared hit=1090
16. 0.080 1.073 ↓ 0.0 0 29

Subquery Scan on d1_1 (cost=46.00..49.12 rows=1 width=200) (actual time=0.033..0.037 rows=0 loops=29)

  • Buffers: shared hit=429
17. 0.158 0.783 ↓ 0.0 0 29

HashAggregate (cost=46.00..49.11 rows=1 width=290) (actual time=0.025..0.027 rows=0 loops=29)

  • Group Key: entries_1.entry_id
  • Buffers: shared hit=369
18. 0.348 0.493 ↓ 0.0 0 29

Bitmap Heap Scan on entries entries_1 (cost=4.37..45.98 rows=1 width=290) (actual time=0.017..0.017 rows=0 loops=29)

  • Recheck Cond: (entry_group_id = entry_groups.entry_group_id)
  • Filter: ((deleted_at IS NULL) AND (entry_type = 'MARKET'::text))
  • Rows Removed by Filter: 17
  • Heap Blocks: exact=298
  • Buffers: shared hit=357
19. 0.145 0.145 ↓ 1.8 21 29

Bitmap Index Scan on entry_group_id (cost=0.00..4.37 rows=12 width=0) (actual time=0.005..0.005 rows=21 loops=29)

  • Index Cond: (entry_group_id = entry_groups.entry_group_id)
  • Buffers: shared hit=59
20.          

SubPlan (forHashAggregate)

21. 0.132 0.132 ↑ 1.0 1 6

Seq Scan on classes_2 classes_2_1 (cost=0.00..3.08 rows=1 width=95) (actual time=0.021..0.022 rows=1 loops=6)

  • Filter: ("classID" = entries_1.class_id)
  • Rows Removed by Filter: 89
  • Buffers: shared hit=12
22.          

SubPlan (forSubquery Scan)

23. 0.120 0.210 ↑ 1.0 1 6

Aggregate (cost=12.26..12.27 rows=1 width=314) (actual time=0.035..0.035 rows=1 loops=6)

  • Buffers: shared hit=60
24. 0.090 0.090 ↑ 10.0 1 6

Seq Scan on shows shows_1 (cost=0.00..12.21 rows=10 width=314) (actual time=0.011..0.015 rows=1 loops=6)

  • Filter: (show_id = ANY (d1_1.shows))
  • Rows Removed by Filter: 99
  • Buffers: shared hit=60
25. 0.151 3.306 ↑ 1.0 1 29

Subquery Scan on d1_2 (cost=46.01..49.13 rows=1 width=200) (actual time=0.063..0.114 rows=1 loops=29)

  • Buffers: shared hit=861
26. 0.481 1.769 ↑ 1.0 1 29

HashAggregate (cost=46.01..49.12 rows=1 width=290) (actual time=0.037..0.061 rows=1 loops=29)

  • Group Key: (entries_2.entry_details ->> 'name'::text), (entries_2.entry_details ->> 'date_of_birth'::text), entries_2.class_id
  • Buffers: shared hit=441
27. 0.290 0.406 ↑ 1.0 1 29

Bitmap Heap Scan on entries entries_2 (cost=4.37..45.99 rows=1 width=290) (actual time=0.010..0.014 rows=1 loops=29)

  • Recheck Cond: (entry_group_id = entry_groups.entry_group_id)
  • Filter: ((deleted_at IS NULL) AND (entry_type = 'SHOWMANSHIP'::text))
  • Rows Removed by Filter: 15
  • Heap Blocks: exact=298
  • Buffers: shared hit=357
28. 0.116 0.116 ↓ 1.8 21 29

Bitmap Index Scan on entry_group_id (cost=0.00..4.37 rows=12 width=0) (actual time=0.004..0.004 rows=21 loops=29)

  • Index Cond: (entry_group_id = entry_groups.entry_group_id)
  • Buffers: shared hit=59
29.          

SubPlan (forHashAggregate)

30. 0.882 0.882 ↑ 1.0 1 42

Seq Scan on classes_2 classes_2_2 (cost=0.00..3.08 rows=1 width=95) (actual time=0.019..0.021 rows=1 loops=42)

  • Filter: ("classID" = entries_2.class_id)
  • Rows Removed by Filter: 89
  • Buffers: shared hit=84
31.          

SubPlan (forSubquery Scan)

32. 0.798 1.386 ↑ 1.0 1 42

Aggregate (cost=12.26..12.27 rows=1 width=314) (actual time=0.033..0.033 rows=1 loops=42)

  • Buffers: shared hit=420
33. 0.588 0.588 ↑ 10.0 1 42

Seq Scan on shows shows_2 (cost=0.00..12.21 rows=10 width=314) (actual time=0.010..0.014 rows=1 loops=42)

  • Filter: (show_id = ANY (d1_2.shows))
  • Rows Removed by Filter: 99
  • Buffers: shared hit=420
34. 0.058 0.493 ↓ 0.0 0 29

Subquery Scan on d1_3 (cost=46.01..49.13 rows=1 width=200) (actual time=0.017..0.017 rows=0 loops=29)

  • Buffers: shared hit=357
35. 0.058 0.435 ↓ 0.0 0 29

HashAggregate (cost=46.01..49.12 rows=1 width=290) (actual time=0.015..0.015 rows=0 loops=29)

  • Group Key: (entries_3.entry_details ->> 'name'::text), (entries_3.entry_details ->> 'date_of_birth'::text), entries_3.class_id
  • Buffers: shared hit=357
36. 0.232 0.377 ↓ 0.0 0 29

Bitmap Heap Scan on entries entries_3 (cost=4.37..45.99 rows=1 width=290) (actual time=0.013..0.013 rows=0 loops=29)

  • Recheck Cond: (entry_group_id = entry_groups.entry_group_id)
  • Filter: ((deleted_at IS NULL) AND (entry_type = 'JABGA_REGIONAL'::text))
  • Rows Removed by Filter: 17
  • Heap Blocks: exact=298
  • Buffers: shared hit=357
37. 0.145 0.145 ↓ 1.8 21 29

Bitmap Index Scan on entry_group_id (cost=0.00..4.37 rows=12 width=0) (actual time=0.005..0.005 rows=21 loops=29)

  • Index Cond: (entry_group_id = entry_groups.entry_group_id)
  • Buffers: shared hit=59
38.          

SubPlan (forHashAggregate)

39. 0.000 0.000 ↓ 0.0 0

Seq Scan on classes_2 classes_2_3 (cost=0.00..3.08 rows=1 width=95) (never executed)

  • Filter: ("classID" = entries_3.class_id)
40.          

SubPlan (forSubquery Scan)

41. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=12.26..12.27 rows=1 width=314) (never executed)

42. 0.000 0.000 ↓ 0.0 0

Seq Scan on shows shows_3 (cost=0.00..12.21 rows=10 width=314) (never executed)

  • Filter: (show_id = ANY (d1_3.shows))
43. 0.058 0.406 ↓ 0.0 0 29

Subquery Scan on d1_4 (cost=46.00..49.12 rows=1 width=200) (actual time=0.014..0.014 rows=0 loops=29)

  • Buffers: shared hit=357
44. 0.029 0.348 ↓ 0.0 0 29

HashAggregate (cost=46.00..49.11 rows=1 width=306) (actual time=0.012..0.012 rows=0 loops=29)

  • Group Key: entries_4.entry_group_id, entries_4.class_id
  • Buffers: shared hit=357
45. 0.232 0.319 ↓ 0.0 0 29

Bitmap Heap Scan on entries entries_4 (cost=4.37..45.98 rows=1 width=306) (actual time=0.011..0.011 rows=0 loops=29)

  • Recheck Cond: (entry_group_id = entry_groups.entry_group_id)
  • Filter: ((deleted_at IS NULL) AND (entry_type = 'GROUP'::text))
  • Rows Removed by Filter: 17
  • Heap Blocks: exact=298
  • Buffers: shared hit=357
46. 0.087 0.087 ↓ 1.8 21 29

Bitmap Index Scan on entry_group_id (cost=0.00..4.37 rows=12 width=0) (actual time=0.003..0.003 rows=21 loops=29)

  • Index Cond: (entry_group_id = entry_groups.entry_group_id)
  • Buffers: shared hit=59
47.          

SubPlan (forHashAggregate)

48. 0.000 0.000 ↓ 0.0 0

Seq Scan on classes_2 classes_2_4 (cost=0.00..3.08 rows=1 width=95) (never executed)

  • Filter: ("classID" = entries_4.class_id)
49.          

SubPlan (forSubquery Scan)

50. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=12.26..12.27 rows=1 width=314) (never executed)

51. 0.000 0.000 ↓ 0.0 0

Seq Scan on shows shows_4 (cost=0.00..12.21 rows=10 width=314) (never executed)

  • Filter: (show_id = ANY (d1_4.shows))
52. 0.029 0.377 ↓ 0.0 0 29

Subquery Scan on d1_5 (cost=46.01..49.13 rows=1 width=200) (actual time=0.013..0.013 rows=0 loops=29)

  • Buffers: shared hit=357
53. 0.029 0.348 ↓ 0.0 0 29

HashAggregate (cost=46.01..49.12 rows=1 width=306) (actual time=0.012..0.012 rows=0 loops=29)

  • Group Key: entries_5.entry_group_id, (entries_5.entry_details ->> 'name'::text), entries_5.class_id
  • Buffers: shared hit=357
54. 0.232 0.319 ↓ 0.0 0 29

Bitmap Heap Scan on entries entries_5 (cost=4.37..45.98 rows=1 width=306) (actual time=0.011..0.011 rows=0 loops=29)

  • Recheck Cond: (entry_group_id = entry_groups.entry_group_id)
  • Filter: ((deleted_at IS NULL) AND (entry_type = 'EVENT'::text))
  • Rows Removed by Filter: 17
  • Heap Blocks: exact=298
  • Buffers: shared hit=357
55. 0.087 0.087 ↓ 1.8 21 29

Bitmap Index Scan on entry_group_id (cost=0.00..4.37 rows=12 width=0) (actual time=0.003..0.003 rows=21 loops=29)

  • Index Cond: (entry_group_id = entry_groups.entry_group_id)
  • Buffers: shared hit=59
56.          

SubPlan (forHashAggregate)

57. 0.000 0.000 ↓ 0.0 0

Seq Scan on classes_2 classes_2_5 (cost=0.00..3.08 rows=1 width=95) (never executed)

  • Filter: ("classID" = entries_5.class_id)
58.          

SubPlan (forSubquery Scan)

59. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=12.26..12.27 rows=1 width=314) (never executed)

60. 0.000 0.000 ↓ 0.0 0

Seq Scan on shows shows_5 (cost=0.00..12.21 rows=10 width=314) (never executed)

  • Filter: (show_id = ANY (d1_5.shows))
61. 0.435 3.016 ↑ 1.0 1 29

Aggregate (cost=66.87..66.88 rows=1 width=30) (actual time=0.104..0.104 rows=1 loops=29)

  • Buffers: shared hit=1682
62. 2.581 2.581 ↑ 1.0 1 29

Seq Scan on payments (cost=0.00..66.85 rows=1 width=30) (actual time=0.080..0.089 rows=1 loops=29)

  • Filter: ((deleted_at IS NULL) AND (entry_group_id = entry_groups.entry_group_id) AND (status = 'PAID'::text))
  • Rows Removed by Filter: 598
  • Buffers: shared hit=1682
Planning time : 2.414 ms
Execution time : 140.839 ms