explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fiwR

Settings
# exclusive inclusive rows x rows loops node
1. 215.676 22,186.930 ↑ 1.0 1 1

Aggregate (cost=1,641,191.51..1,641,191.52 rows=1 width=8) (actual time=22,186.914..22,186.930 rows=1 loops=1)

2. 470.018 21,971.254 ↓ 13,673.7 2,734,747 1

Unique (cost=1,627,583.40..1,641,189.01 rows=200 width=428) (actual time=20,825.857..21,971.254 rows=2,734,747 loops=1)

3. 2,635.578 21,501.236 ↓ 1.0 2,734,747 1

Sort (cost=1,627,583.40..1,634,386.20 rows=2,721,121 width=428) (actual time=20,825.855..21,501.236 rows=2,734,747 loops=1)

  • Sort Key: e.event_uuid
  • Sort Method: external merge Disk: 91,040kB
4. 827.570 18,865.658 ↓ 1.0 2,734,747 1

Hash Left Join (cost=37,476.25..655,142.62 rows=2,721,121 width=428) (actual time=10,040.109..18,865.658 rows=2,734,747 loops=1)

  • Hash Cond: (e.plan_uuid = p_info.plan_uuid)
5. 263.555 8,030.700 ↓ 1.0 2,734,747 1

Append (cost=0.41..607,459.23 rows=2,721,121 width=32) (actual time=32.667..8,030.700 rows=2,734,747 loops=1)

  • Subplans Removed: 4
6. 0.077 0.077 ↓ 0.0 0 1

Index Scan using events_org_part_199_l3_f_202007_valid_range_idx on events_org_part_199_l3_f_202007 e (cost=0.41..3.44 rows=1 width=32) (actual time=0.076..0.077 rows=0 loops=1)

  • Index 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()))
7. 0.059 0.059 ↓ 0.0 0 1

Index Scan using events_org_part_199_l3_f_202008_valid_range_idx on events_org_part_199_l3_f_202008 e_1 (cost=0.41..3.44 rows=1 width=32) (actual time=0.059..0.059 rows=0 loops=1)

  • Index 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()))
8. 0.068 0.068 ↓ 0.0 0 1

Index Scan using events_org_part_199_l3_f_202009_valid_range_idx on events_org_part_199_l3_f_202009 e_2 (cost=0.41..3.44 rows=1 width=32) (actual time=0.068..0.068 rows=0 loops=1)

  • Index 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.067 0.067 ↓ 0.0 0 1

Index Scan using events_org_part_199_l3_f_202010_valid_range_idx on events_org_part_199_l3_f_202010 e_3 (cost=0.29..3.31 rows=1 width=32) (actual time=0.066..0.067 rows=0 loops=1)

  • Index 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()))
10. 1,371.597 1,371.597 ↑ 1.0 431,979 1

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..113,925.77 rows=434,811 width=32) (actual time=32.395..1,371.597 rows=431,979 loops=1)

  • 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()))
11. 1,388.324 1,388.324 ↓ 1.0 891,210 1

Seq Scan on events_org_part_199_l3_t_202008 e_5 (cost=0.00..179,962.30 rows=890,172 width=32) (actual time=0.017..1,388.324 rows=891,210 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()))
12. 1,582.966 1,582.966 ↓ 1.0 961,705 1

Seq Scan on events_org_part_199_l3_t_202009 e_6 (cost=0.00..202,719.33 rows=961,053 width=32) (actual time=0.016..1,582.966 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()))
13. 3,423.987 3,423.987 ↓ 1.0 449,853 1

Seq Scan on events_org_part_199_l3_t_202010 e_7 (cost=0.00..97,219.93 rows=435,077 width=32) (actual time=0.033..3,423.987 rows=449,853 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()))
14. 0.017 10,007.388 ↓ 2.0 2 1

Hash (cost=37,475.82..37,475.82 rows=1 width=16) (actual time=10,007.383..10,007.388 rows=2 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
15. 0.013 10,007.371 ↓ 2.0 2 1

Subquery Scan on p_info (cost=37,470.75..37,475.82 rows=1 width=16) (actual time=10,007.282..10,007.371 rows=2 loops=1)

  • Filter: (p_info.row_num = 1)
  • Rows Removed by Filter: 143
16. 0.091 10,007.358 ↑ 1.0 145 1

WindowAgg (cost=37,470.75..37,474.01 rows=145 width=486) (actual time=10,007.279..10,007.358 rows=145 loops=1)

17. 0.465 10,007.267 ↑ 1.0 145 1

Sort (cost=37,470.75..37,471.11 rows=145 width=24) (actual time=10,007.256..10,007.267 rows=145 loops=1)

  • Sort Key: pl.plan_uuid, (lower(pl.valid_range)) DESC
  • Sort Method: quicksort Memory: 36kB
18. 7,014.924 10,006.802 ↑ 1.0 145 1

Bitmap Heap Scan on plans pl (cost=9,672.43..37,465.54 rows=145 width=24) (actual time=3,242.520..10,006.802 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
19. 2.681 2,991.878 ↓ 0.0 0 1

BitmapAnd (cost=9,672.43..9,672.43 rows=29,125 width=0) (actual time=2,991.876..2,991.878 rows=0 loops=1)

20. 44.542 44.542 ↓ 1.0 269,756 1

Bitmap Index Scan on plans_organization_uuid_idx (cost=0.00..4,371.66 rows=263,831 width=0) (actual time=44.542..44.542 rows=269,756 loops=1)

  • Index Cond: (organization_uuid = 'fcb0b139-ed68-4220-a7a6-7e56e8214519'::uuid)
21. 2,944.655 2,944.655 ↓ 1.1 239,953 1

Bitmap Index Scan on plans_valid_range_gist (cost=0.00..5,300.45 rows=222,271 width=0) (actual time=2,944.655..2,944.655 rows=239,953 loops=1)

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