explain.depesz.com

PostgreSQL's explain analyze made readable

Result: TlH2 : Entry_groups

Settings
# exclusive inclusive rows x rows loops node
1. 9.411 67.308 ↑ 1.0 1 1

Aggregate (cost=11,067.31..11,067.32 rows=1 width=810) (actual time=67.307..67.308 rows=1 loops=1)

  • Buffers: shared hit=6578
2. 0.926 57.897 ↑ 1.0 29 1

Subquery Scan on t (cost=11,066.80..11,067.16 rows=29 width=810) (actual time=56.499..57.897 rows=29 loops=1)

  • Buffers: shared hit=6578
3. 1.325 56.971 ↑ 1.0 29 1

Sort (cost=11,066.80..11,066.87 rows=29 width=810) (actual time=56.471..56.971 rows=29 loops=1)

  • Sort Key: ((entry_groups.date_entered)::timestamp with time zone), ((entry_groups.accepted_terms)::timestamp with time zone)
  • Sort Method: quicksort Memory: 3343kB
  • Buffers: shared hit=6578
4. 0.967 55.646 ↑ 1.0 29 1

Bitmap Heap Scan on entry_groups (cost=4.51..11,066.09 rows=29 width=810) (actual time=3.795..55.646 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
5. 0.014 0.014 ↑ 1.0 30 1

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

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

SubPlan (forBitmap Heap Scan)

7. 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
8. 4.988 50.953 ↑ 1.0 1 29

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

  • Buffers: shared hit=4787
9. 0.232 45.965 ↑ 1.8 5 29

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

  • Buffers: shared hit=4787
10. 0.766 39.904 ↑ 1.0 4 29

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

  • Buffers: shared hit=2426
11. 2.974 6.438 ↑ 1.0 4 29

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

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

Bitmap Heap Scan on entries (cost=4.37..46.02 rows=7 width=290) (actual time=0.013..0.033 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
13. 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
14.          

SubPlan (forHashAggregate)

15. 2.507 2.507 ↑ 1.0 1 109

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

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

SubPlan (forSubquery Scan)

17. 30.302 32.700 ↑ 1.0 1 109

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

  • Buffers: shared hit=1851
18. 2.398 2.398 ↑ 3.3 3 109

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

  • Filter: (show_id = ANY (d1.shows))
  • Rows Removed by Filter: 97
  • Buffers: shared hit=1090
19. 0.103 1.131 ↓ 0.0 0 29

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

  • Buffers: shared hit=429
20. 0.152 0.812 ↓ 0.0 0 29

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

  • Group Key: entries_1.entry_id
  • Buffers: shared hit=369
21. 0.348 0.522 ↓ 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.018 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
22. 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
23.          

SubPlan (forHashAggregate)

24. 0.138 0.138 ↑ 1.0 1 6

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

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

SubPlan (forSubquery Scan)

26. 0.120 0.216 ↑ 1.0 1 6

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

  • Buffers: shared hit=60
27. 0.096 0.096 ↑ 10.0 1 6

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

  • Filter: (show_id = ANY (d1_1.shows))
  • Rows Removed by Filter: 99
  • Buffers: shared hit=60
28. 0.135 3.364 ↑ 1.0 1 29

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

  • Buffers: shared hit=861
29. 0.526 1.885 ↑ 1.0 1 29

HashAggregate (cost=46.01..49.12 rows=1 width=290) (actual time=0.039..0.065 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
30. 0.319 0.435 ↑ 1.0 1 29

Bitmap Heap Scan on entries entries_2 (cost=4.37..45.99 rows=1 width=290) (actual time=0.011..0.015 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
31. 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
32.          

SubPlan (forHashAggregate)

33. 0.924 0.924 ↑ 1.0 1 42

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

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

SubPlan (forSubquery Scan)

35. 0.756 1.344 ↑ 1.0 1 42

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

  • Buffers: shared hit=420
36. 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
37. 0.058 0.522 ↓ 0.0 0 29

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

  • Buffers: shared hit=357
38. 0.058 0.464 ↓ 0.0 0 29

HashAggregate (cost=46.01..49.12 rows=1 width=290) (actual time=0.016..0.016 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
39. 0.290 0.406 ↓ 0.0 0 29

Bitmap Heap Scan on entries entries_3 (cost=4.37..45.99 rows=1 width=290) (actual time=0.014..0.014 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
40. 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
41.          

SubPlan (forHashAggregate)

42. 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)
43.          

SubPlan (forSubquery Scan)

44. 0.000 0.000 ↓ 0.0 0

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

45. 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))
46. 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
47. 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
48. 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
49. 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
50.          

SubPlan (forHashAggregate)

51. 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)
52.          

SubPlan (forSubquery Scan)

53. 0.000 0.000 ↓ 0.0 0

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

54. 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))
55. 0.058 0.406 ↓ 0.0 0 29

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

  • Buffers: shared hit=357
56. 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
57. 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
58. 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
59.          

SubPlan (forHashAggregate)

60. 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)
61.          

SubPlan (forSubquery Scan)

62. 0.000 0.000 ↓ 0.0 0

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

63. 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))
64. 0.435 3.074 ↑ 1.0 1 29

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

  • Buffers: shared hit=1682
65. 2.639 2.639 ↑ 1.0 1 29

Seq Scan on payments (cost=0.00..66.85 rows=1 width=30) (actual time=0.080..0.091 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.638 ms
Execution time : 67.833 ms