explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mHP9a

Settings
# exclusive inclusive rows x rows loops node
1. 0.383 4,289.362 ↓ 5.0 5 1

Limit (cost=484,074.26..484,074.38 rows=1 width=289) (actual time=4,253.229..4,289.362 rows=5 loops=1)

2. 0.000 4,288.979 ↓ 62.6 4,005 1

Gather Merge (cost=484,066.80..484,074.26 rows=64 width=289) (actual time=4,246.644..4,288.979 rows=4,005 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 95.178 12,702.909 ↓ 51.2 1,639 3

Sort (cost=483,066.77..483,066.85 rows=32 width=289) (actual time=4,233.822..4,234.303 rows=1,639 loops=3)

  • Sort Key: c.id DESC
  • Sort Method: quicksort Memory: 2526kB
4. 108.582 12,607.731 ↓ 368.8 11,800 3

Nested Loop Left Join (cost=111,994.25..483,065.97 rows=32 width=289) (actual time=3,257.971..4,202.577 rows=11,800 loops=3)

5. 139.266 12,180.540 ↓ 368.8 11,800 3

Hash Join (cost=111,993.95..483,055.74 rows=32 width=297) (actual time=3,257.809..4,060.180 rows=11,800 loops=3)

  • Hash Cond: (pcs.time_zone_id = tz.id)
  • Join Filter: ((timezone((tz.abbr)::text, c.call_datetime) >= '2015-01-01 00:00:00'::timestamp without time zone) AND (timezone((tz.abbr)::text, c.call_datetime) <= '2018-05-30 23:59:59'::timestamp without time zone))
  • Rows Removed by Join Filter: 4905
6. 107.097 12,040.977 ↓ 58.6 16,706 3

Hash Join (cost=111,991.32..483,052.34 rows=285 width=301) (actual time=3,257.427..4,013.659 rows=16,706 loops=3)

  • Hash Cond: (c.property_id = pcs.property_id)
7. 8,668.073 11,900.754 ↑ 7.4 16,706 3

Parallel Bitmap Heap Scan on calls c (cost=111,618.20..482,354.03 rows=123,875 width=297) (actual time=3,246.343..3,966.918 rows=16,706 loops=3)

  • Recheck Cond: (((property_id = ANY ('{103618,264930,93367,189068}'::integer[])) OR ((property_id IS NULL) AND (property_id IS NOT NULL))) AND (cid = 3049))
  • Filter: ((is_test_call = 0) AND (is_auto_detected = 0) AND (call_type_id = ANY ('{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48}'::integer[])) AND (call_result_id = ANY ('{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141}'::integer[])))
  • Rows Removed by Filter: 4
  • Heap Blocks: exact=15055
8. 40.268 3,232.681 ↓ 0.0 0 1

BitmapAnd (cost=111,618.20..111,618.20 rows=377,721 width=0) (actual time=3,232.680..3,232.681 rows=0 loops=1)

9. 0.004 26.058 ↓ 0.0 0 1

BitmapOr (cost=31,449.93..31,449.93 rows=3,055,662 width=0) (actual time=26.058..26.058 rows=0 loops=1)

10. 26.014 26.014 ↓ 2.5 50,130 1

Bitmap Index Scan on calls_property_id_idx (cost=0.00..206.28 rows=19,738 width=0) (actual time=26.014..26.014 rows=50,130 loops=1)

  • Index Cond: (property_id = ANY ('{103618,264930,93367,189068}'::integer[]))
11. 0.040 0.040 ↓ 0.0 0 1

Bitmap Index Scan on calls_property_id_idx (cost=0.00..31,095.00 rows=3,035,925 width=0) (actual time=0.040..0.040 rows=0 loops=1)

  • Index Cond: (property_id IS NULL)
12. 3,166.355 3,166.355 ↓ 1.0 7,150,447 1

Bitmap Index Scan on idx_calls_ivr_menu_action_id (cost=0.00..80,093.69 rows=7,105,750 width=0) (actual time=3,166.355..3,166.355 rows=7,150,447 loops=1)

  • Index Cond: (cid = 3049)
13. 1.911 33.126 ↓ 2.3 870 3

Hash (cost=368.40..368.40 rows=378 width=12) (actual time=11.042..11.042 rows=870 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 46kB
14. 31.215 31.215 ↓ 2.3 870 3

Index Scan using uk_property_call_settings_cid_property_id on property_call_settings pcs (cost=0.42..368.40 rows=378 width=12) (actual time=0.120..10.405 rows=870 loops=3)

  • Index Cond: (cid = 3049)
15. 0.066 0.297 ↑ 2.0 14 3

Hash (cost=2.28..2.28 rows=28 width=8) (actual time=0.098..0.099 rows=14 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
16. 0.231 0.231 ↑ 2.0 14 3

Seq Scan on time_zones tz (cost=0.00..2.28 rows=28 width=8) (actual time=0.043..0.077 rows=14 loops=3)

17. 318.609 318.609 ↑ 1.0 1 35,401

Index Scan using pk_call_phone_numbers on call_phone_numbers cpn (cost=0.29..0.32 rows=1 width=8) (actual time=0.009..0.009 rows=1 loops=35,401)

  • Index Cond: (id = c.call_phone_number_id)
Planning time : 5.949 ms