explain.depesz.com

PostgreSQL's explain analyze made readable

Result: R1UM

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 4,887.916 ↓ 553.1 35,401 1

Gather Merge (cost=484,066.80..484,074.26 rows=64 width=289) (actual time=4,814.700..4,887.916 rows=35,401 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
2. 56.415 14,286.258 ↓ 368.8 11,800 3

Sort (cost=483,066.77..483,066.85 rows=32 width=289) (actual time=4,758.237..4,762.086 rows=11,800 loops=3)

  • Sort Key: c.id DESC
  • Sort Method: quicksort Memory: 2663kB
3. 48.541 14,229.843 ↓ 368.8 11,800 3

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

4. 57.474 13,685.688 ↓ 368.8 11,800 3

Hash Join (cost=111,993.95..483,055.74 rows=32 width=297) (actual time=4,409.260..4,561.896 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
5. 46.068 13,628.013 ↓ 58.6 16,706 3

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

  • Hash Cond: (c.property_id = pcs.property_id)
6. 9,111.954 13,562.637 ↑ 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=4,402.551..4,520.879 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=15534
7. 16.275 4,450.683 ↓ 0.0 0 1

BitmapAnd (cost=111,618.20..111,618.20 rows=377,721 width=0) (actual time=4,450.683..4,450.683 rows=0 loops=1)

8. 0.003 16.560 ↓ 0.0 0 1

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

9. 16.543 16.543 ↓ 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=16.543..16.543 rows=50,130 loops=1)

  • Index Cond: (property_id = ANY ('{103618,264930,93367,189068}'::integer[]))
10. 0.014 0.014 ↓ 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.014..0.014 rows=0 loops=1)

  • Index Cond: (property_id IS NULL)
11. 4,417.848 4,417.848 ↓ 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=4,417.848..4,417.848 rows=7,150,447 loops=1)

  • Index Cond: (cid = 3049)
12. 1.602 19.308 ↓ 2.3 870 3

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

  • Buckets: 1024 Batches: 1 Memory Usage: 46kB
13. 17.706 17.706 ↓ 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.072..5.902 rows=870 loops=3)

  • Index Cond: (cid = 3049)
14. 0.045 0.201 ↑ 2.0 14 3

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
15. 0.156 0.156 ↑ 2.0 14 3

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

16. 495.614 495.614 ↑ 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.014..0.014 rows=1 loops=35,401)

  • Index Cond: (id = c.call_phone_number_id)