explain.depesz.com

PostgreSQL's explain analyze made readable

Result: NwEF

Settings
# exclusive inclusive rows x rows loops node
1. 36.170 49,245.907 ↑ 1.0 1 1

Aggregate (cost=601,282.76..601,282.77 rows=1 width=8) (actual time=49,245.907..49,245.907 rows=1 loops=1)

2. 90.503 49,209.737 ↓ 577,021.0 577,021 1

Unique (cost=601,282.74..601,282.75 rows=1 width=460) (actual time=49,011.360..49,209.737 rows=577,021 loops=1)

3. 480.945 49,119.234 ↓ 577,021.0 577,021 1

Sort (cost=601,282.74..601,282.75 rows=1 width=460) (actual time=49,011.358..49,119.234 rows=577,021 loops=1)

  • Sort Key: e.event_uuid
  • Sort Method: external merge Disk: 19,216kB
4. 612.118 48,638.289 ↓ 577,021.0 577,021 1

Nested Loop Left Join (cost=43,905.75..601,282.73 rows=1 width=460) (actual time=208.524..48,638.289 rows=577,021 loops=1)

  • Join Filter: (p_info.plan_uuid = e.plan_uuid)
  • Rows Removed by Join Filter: 577,021
5. 0.000 133.428 ↓ 577,021.0 577,021 1

Gather (cost=6,429.42..563,801.31 rows=1 width=32) (actual time=14.903..133.428 rows=577,021 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
6. 169.169 1,074.677 ↓ 115,404.0 115,404 5 / 5

Parallel Hash Join (cost=5,429.42..562,801.21 rows=1 width=32) (actual time=3.775..1,074.677 rows=115,404 loops=5)

  • Hash Cond: (e.form_uuid = f.form_uuid)
  • Join Filter: (f.valid_range @> e.created)
  • Rows Removed by Join Filter: 461,617
7. 52.989 902.290 ↑ 1.2 546,949 5 / 5

Parallel Append (cost=1.80..548,864.58 rows=680,634 width=56) (actual time=0.237..902.290 rows=546,949 loops=5)

  • Subplans Removed: 4
8. 0.005 0.059 ↓ 0.0 0 1 / 5

Parallel Bitmap Heap Scan on events_org_part_199_l3_f_202007 e (cost=1.92..3.43 rows=1 width=56) (actual time=0.297..0.297 rows=0 loops=1)

  • Recheck Cond: (valid_range @> now())
  • Filter: (is_visible AND (created >= '2020-07-17 16:49:36+00'::timestamp with time zone) AND (organization_uuid = 'fcb0b139-ed68-4220-a7a6-7e56e8214519'::uuid) AND (created <= now()))
9. 0.054 0.054 ↓ 0.0 0 1 / 5

Bitmap Index Scan on events_org_part_199_l3_f_202007_valid_range_idx (cost=0.00..1.92 rows=1 width=0) (actual time=0.272..0.272 rows=0 loops=1)

  • Index Cond: (valid_range @> now())
10. 0.003 0.046 ↓ 0.0 0 1 / 5

Parallel Bitmap Heap Scan on events_org_part_199_l3_f_202008 e_1 (cost=1.92..3.43 rows=1 width=56) (actual time=0.231..0.231 rows=0 loops=1)

  • Recheck Cond: (valid_range @> now())
  • Filter: (is_visible AND (created >= '2020-07-17 16:49:36+00'::timestamp with time zone) AND (organization_uuid = 'fcb0b139-ed68-4220-a7a6-7e56e8214519'::uuid) AND (created <= now()))
11. 0.043 0.043 ↓ 0.0 0 1 / 5

Bitmap Index Scan on events_org_part_199_l3_f_202008_valid_range_idx (cost=0.00..1.92 rows=1 width=0) (actual time=0.216..0.216 rows=0 loops=1)

  • Index Cond: (valid_range @> now())
12. 0.001 0.044 ↓ 0.0 0 1 / 5

Parallel Bitmap Heap Scan on events_org_part_199_l3_f_202009 e_2 (cost=1.92..3.43 rows=1 width=56) (actual time=0.218..0.218 rows=0 loops=1)

  • Recheck Cond: (valid_range @> now())
  • Filter: (is_visible AND (created >= '2020-07-17 16:49:36+00'::timestamp with time zone) AND (organization_uuid = 'fcb0b139-ed68-4220-a7a6-7e56e8214519'::uuid) AND (created <= now()))
13. 0.042 0.042 ↓ 0.0 0 1 / 5

Bitmap Index Scan on events_org_part_199_l3_f_202009_valid_range_idx (cost=0.00..1.92 rows=1 width=0) (actual time=0.211..0.211 rows=0 loops=1)

  • Index Cond: (valid_range @> now())
14. 0.006 0.048 ↓ 0.0 0 1 / 5

Parallel Bitmap Heap Scan on events_org_part_199_l3_f_202010 e_3 (cost=1.80..3.31 rows=1 width=56) (actual time=0.238..0.238 rows=0 loops=1)

  • Recheck Cond: (valid_range @> now())
  • Filter: (is_visible AND (created >= '2020-07-17 16:49:36+00'::timestamp with time zone) AND (organization_uuid = 'fcb0b139-ed68-4220-a7a6-7e56e8214519'::uuid) AND (created <= now()))
15. 0.042 0.042 ↓ 0.0 0 1 / 5

Bitmap Index Scan on events_org_part_199_l3_f_202010_valid_range_idx (cost=0.00..1.79 rows=1 width=0) (actual time=0.210..0.210 rows=0 loops=1)

  • Index Cond: (valid_range @> now())
16. 230.831 230.831 ↓ 2.0 215,990 2 / 5

Parallel Index Scan using events_org_part_199_l3_t_202007_created_idx on events_org_part_199_l3_t_202007 e_4 (cost=0.43..108,218.88 rows=108,703 width=56) (actual time=0.047..577.077 rows=215,990 loops=2)

  • Index Cond: ((created >= '2020-07-17 16:49:36+00'::timestamp with time zone) AND (created <= now()))
  • Filter: (is_visible AND (organization_uuid = 'fcb0b139-ed68-4220-a7a6-7e56e8214519'::uuid) AND (valid_range @> now()))
17. 257.961 257.961 ↓ 4.0 961,705 1 / 5

Parallel Seq Scan on events_org_part_199_l3_t_202009 e_6 (cost=0.00..184,699.58 rows=240,263 width=56) (actual time=0.055..1,289.804 rows=961,705 loops=1)

  • Filter: (is_visible AND (created >= '2020-07-17 16:49:36+00'::timestamp with time zone) AND (organization_uuid = 'fcb0b139-ed68-4220-a7a6-7e56e8214519'::uuid) AND (valid_range @> now()) AND (created <= now()))
18. 216.716 216.716 ↓ 2.0 445,605 2 / 5

Parallel Seq Scan on events_org_part_199_l3_t_202008 e_5 (cost=0.00..163,271.58 rows=222,543 width=56) (actual time=0.053..541.789 rows=445,605 loops=2)

  • Filter: (is_visible AND (created >= '2020-07-17 16:49:36+00'::timestamp with time zone) AND (organization_uuid = 'fcb0b139-ed68-4220-a7a6-7e56e8214519'::uuid) AND (valid_range @> now()) AND (created <= now()))
19. 143.597 143.597 ↓ 1.4 149,951 3 / 5

Parallel Seq Scan on events_org_part_199_l3_t_202010 e_7 (cost=0.00..89,245.11 rows=109,124 width=56) (actual time=0.017..239.328 rows=149,951 loops=3)

  • Filter: (is_visible AND (created >= '2020-07-17 16:49:36+00'::timestamp with time zone) AND (organization_uuid = 'fcb0b139-ed68-4220-a7a6-7e56e8214519'::uuid) AND (valid_range @> now()) AND (created <= now()))
20. 0.039 3.218 ↑ 8.0 1 5 / 5

Parallel Hash (cost=5,427.53..5,427.53 rows=8 width=36) (actual time=3.218..3.218 rows=1 loops=5)

  • Buckets: 1,024 Batches: 1 Memory Usage: 40kB
21. 3.019 3.179 ↑ 8.0 1 5 / 5

Parallel Bitmap Heap Scan on forms f (cost=72.97..5,427.53 rows=8 width=36) (actual time=2.712..3.179 rows=1 loops=5)

  • Recheck Cond: (organization_uuid = 'fcb0b139-ed68-4220-a7a6-7e56e8214519'::uuid)
  • Filter: ((is_visible IS TRUE) AND (lower((name)::text) = 'mtech devops'::text))
  • Rows Removed by Filter: 799
  • Heap Blocks: exact=1,917
22. 0.160 0.160 ↑ 1.0 3,999 1 / 5

Bitmap Index Scan on forms_organization_uuid_idx (cost=0.00..72.96 rows=4,072 width=0) (actual time=0.802..0.802 rows=3,999 loops=1)

  • Index Cond: (organization_uuid = 'fcb0b139-ed68-4220-a7a6-7e56e8214519'::uuid)
23. 5,193.189 47,892.743 ↓ 2.0 2 577,021

Subquery Scan on p_info (cost=37,476.33..37,481.41 rows=1 width=16) (actual time=0.001..0.083 rows=2 loops=577,021)

  • Filter: (p_info.row_num = 1)
  • Rows Removed by Filter: 143
24. 38,083.386 42,699.554 ↑ 1.0 145 577,021

WindowAgg (cost=37,476.33..37,479.59 rows=145 width=486) (actual time=0.001..0.074 rows=145 loops=577,021)

25. 4,422.792 4,616.168 ↑ 1.0 145 577,021

Sort (cost=37,476.33..37,476.69 rows=145 width=24) (actual time=0.000..0.008 rows=145 loops=577,021)

  • Sort Key: pl.plan_uuid, (lower(pl.valid_range)) DESC
  • Sort Method: quicksort Memory: 36kB
26. 101.568 193.376 ↑ 1.0 145 1

Bitmap Heap Scan on plans pl (cost=9,674.40..37,471.13 rows=145 width=24) (actual time=95.296..193.376 rows=145 loops=1)

  • Recheck Cond: ((organization_uuid = 'fcb0b139-ed68-4220-a7a6-7e56e8214519'::uuid) AND (valid_range && tstzrange('2020-07-17 16:49:36+00'::timestamp with time zone, now(), '[]'::text)))
  • Filter: (is_visible AND (lower((name)::text) = 'mtech devops'::text))
  • Rows Removed by Filter: 75,684
  • Heap Blocks: exact=13,577
27. 2.139 91.808 ↓ 0.0 0 1

BitmapAnd (cost=9,674.40..9,674.40 rows=29,129 width=0) (actual time=91.808..91.808 rows=0 loops=1)

28. 27.344 27.344 ↓ 1.0 269,756 1

Bitmap Index Scan on plans_organization_uuid_idx (cost=0.00..4,373.41 rows=263,865 width=0) (actual time=27.344..27.344 rows=269,756 loops=1)

  • Index Cond: (organization_uuid = 'fcb0b139-ed68-4220-a7a6-7e56e8214519'::uuid)
29. 62.325 62.325 ↓ 1.1 240,269 1

Bitmap Index Scan on plans_valid_range_gist (cost=0.00..5,300.66 rows=222,299 width=0) (actual time=62.324..62.325 rows=240,269 loops=1)

  • Index Cond: (valid_range && tstzrange('2020-07-17 16:49:36+00'::timestamp with time zone, now(), '[]'::text))
Planning time : 17.393 ms
Execution time : 49,252.978 ms