explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lKcj : Get Event by ID

Settings
# exclusive inclusive rows x rows loops node
1. 0.010 57.231 ↑ 1,378.0 1 1

Nested Loop Left Join (cost=8,741.73..27,745.12 rows=1,378 width=528) (actual time=39.125..57.231 rows=1 loops=1)

2. 0.242 56.774 ↑ 3.0 1 1

Nested Loop Left Join (cost=8,741.18..26,632.71 rows=3 width=544) (actual time=38.669..56.774 rows=1 loops=1)

  • Join Filter: (msg.event_uuid = e.event_uuid)
  • Rows Removed by Join Filter: 2,681
3. 0.005 40.591 ↑ 3.0 1 1

Nested Loop Left Join (cost=246.77..17,986.96 rows=3 width=489) (actual time=24.052..40.591 rows=1 loops=1)

4. 0.008 40.489 ↑ 3.0 1 1

Nested Loop Left Join (cost=246.22..17,976.21 rows=3 width=461) (actual time=23.953..40.489 rows=1 loops=1)

5. 37.514 40.419 ↑ 3.0 1 1

Bitmap Heap Scan on events_org_part_default e (cost=245.80..17,965.85 rows=3 width=440) (actual time=23.885..40.419 rows=1 loops=1)

  • Recheck Cond: (organization_uuid = 'a2423b29-4fcb-44c4-88b8-bd2d86d56369'::uuid)
  • Filter: ((is_visible IS TRUE) AND (valid_range @> '2029-12-16 13:38:50+00'::timestamp with time zone) AND ((event_id)::text = '174988018'::text))
  • Rows Removed by Filter: 12,272
  • Heap Blocks: exact=7,445
6. 2.905 2.905 ↑ 1.1 12,295 1

Bitmap Index Scan on events_org_part_default_organization_uuid_expr_idx (cost=0.00..245.80 rows=12,916 width=0) (actual time=2.905..2.905 rows=12,295 loops=1)

  • Index Cond: (organization_uuid = 'a2423b29-4fcb-44c4-88b8-bd2d86d56369'::uuid)
7. 0.062 0.062 ↑ 1.0 1 1

Index Scan using forms_org_seq_vrange_uidx on forms f (cost=0.42..3.44 rows=1 width=37) (actual time=0.061..0.062 rows=1 loops=1)

  • Index Cond: ((organization_uuid = 'a2423b29-4fcb-44c4-88b8-bd2d86d56369'::uuid) AND (form_uuid = e.form_uuid))
  • Filter: ((is_visible IS TRUE) AND (valid_range @> '2029-12-16 13:38:50+00'::timestamp with time zone))
  • Rows Removed by Filter: 3
8. 0.097 0.097 ↑ 1.0 1 1

Index Scan using plans_org_seq_vrange_uidx on plans pl (cost=0.55..3.57 rows=1 width=44) (actual time=0.094..0.097 rows=1 loops=1)

  • Index Cond: ((organization_uuid = 'a2423b29-4fcb-44c4-88b8-bd2d86d56369'::uuid) AND (plan_uuid = e.plan_uuid))
  • Filter: ((is_visible IS TRUE) AND (valid_range @> '2029-12-16 13:38:50+00'::timestamp with time zone))
  • Rows Removed by Filter: 5
9. 0.658 15.941 ↓ 141.2 2,682 1

Materialize (cost=8,494.41..8,644.94 rows=19 width=71) (actual time=12.592..15.941 rows=2,682 loops=1)

10. 0.268 15.283 ↓ 141.2 2,682 1

Subquery Scan on msg (cost=8,494.41..8,644.85 rows=19 width=71) (actual time=12.590..15.283 rows=2,682 loops=1)

  • Filter: (msg.row_number = 1)
11. 2.220 15.015 ↑ 1.4 2,682 1

WindowAgg (cost=8,494.41..8,597.83 rows=3,761 width=118) (actual time=12.586..15.015 rows=2,682 loops=1)

12. 1.569 12.795 ↑ 1.4 2,682 1

Sort (cost=8,494.41..8,503.81 rows=3,761 width=78) (actual time=12.565..12.795 rows=2,682 loops=1)

  • Sort Key: m.event_uuid, (CASE m.language WHEN persons_org_part_8.language THEN 1 WHEN 'en'::text THEN 2 ELSE 3 END), m.language
  • Sort Method: quicksort Memory: 409kB
13. 0.833 11.226 ↑ 1.4 2,682 1

Hash Left Join (cost=1,023.64..8,271.06 rows=3,761 width=78) (actual time=1.447..11.226 rows=2,682 loops=1)

  • Hash Cond: ((m.language)::text = (persons_org_part_8.language)::text)
14. 9.179 10.138 ↑ 1.4 2,682 1

Bitmap Heap Scan on messages_org_part_default m (cost=656.15..7,869.72 rows=3,761 width=74) (actual time=1.176..10.138 rows=2,682 loops=1)

  • Recheck Cond: (organization_uuid = 'a2423b29-4fcb-44c4-88b8-bd2d86d56369'::uuid)
  • Filter: ((is_visible IS TRUE) AND (valid_range @> '2029-12-16 13:38:50+00'::timestamp with time zone))
  • Rows Removed by Filter: 2,435
  • Heap Blocks: exact=1,785
15. 0.959 0.959 ↓ 1.0 5,117 1

Bitmap Index Scan on messages_org_part_default_msg_seq_vrange_uidx (cost=0.00..655.21 rows=4,887 width=0) (actual time=0.959..0.959 rows=5,117 loops=1)

  • Index Cond: (organization_uuid = 'a2423b29-4fcb-44c4-88b8-bd2d86d56369'::uuid)
16. 0.007 0.255 ↑ 5.0 1 1

Hash (cost=367.43..367.43 rows=5 width=3) (actual time=0.255..0.255 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
17. 0.248 0.248 ↑ 5.0 1 1

Index Scan using persons_org_part_8_per_seq_vrange_uidx on persons_org_part_8 (cost=0.56..367.43 rows=5 width=3) (actual time=0.248..0.248 rows=1 loops=1)

  • Index Cond: (person_uuid = '9f4c35ed-c44d-4f28-8628-50a9be309c2d'::uuid)
  • Filter: ((is_visible IS TRUE) AND (valid_range @> '2029-12-16 13:38:50+00'::timestamp with time zone) AND (organization_uuid = 'a2423b29-4fcb-44c4-88b8-bd2d86d56369'::uuid))
  • Rows Removed by Filter: 50
18. 0.447 0.447 ↑ 5.0 1 1

Index Scan using persons_org_part_8_per_seq_vrange_uidx on persons_org_part_8 p (cost=0.56..368.46 rows=5 width=41) (actual time=0.446..0.447 rows=1 loops=1)

  • Index Cond: (person_uuid = e.submitter_uuid)
  • Filter: ((is_visible IS TRUE) AND (valid_range @> '2029-12-16 13:38:50+00'::timestamp with time zone) AND (organization_uuid = 'a2423b29-4fcb-44c4-88b8-bd2d86d56369'::uuid))
  • Rows Removed by Filter: 135
Planning time : 6.563 ms
Execution time : 57.805 ms