explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2qGD

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 2,688.310 ↓ 118.4 7,580 1

Gather Merge (cost=484,066.80..484,074.26 rows=64 width=289) (actual time=2,656.751..2,688.310 rows=7,580 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
2. 13.938 7,934.565 ↓ 79.0 2,527 3

Sort (cost=483,066.77..483,066.85 rows=32 width=289) (actual time=2,644.318..2,644.855 rows=2,527 loops=3)

  • Sort Key: c.id DESC
  • Sort Method: quicksort Memory: 634kB
3. 14.798 7,920.627 ↓ 79.0 2,527 3

Nested Loop Left Join (cost=111,994.25..483,065.97 rows=32 width=289) (actual time=2,293.902..2,640.209 rows=2,527 loops=3)

4. 61.743 7,845.189 ↓ 79.0 2,527 3

Hash Join (cost=111,993.95..483,055.74 rows=32 width=297) (actual time=2,293.813..2,615.063 rows=2,527 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) <= '2016-05-30 23:59:59'::timestamp without time zone))
  • Rows Removed by Join Filter: 14179
5. 55.593 7,783.155 ↓ 58.6 16,706 3

Hash Join (cost=111,991.32..483,052.34 rows=285 width=301) (actual time=2,293.435..2,594.385 rows=16,706 loops=3)

  • Hash Cond: (c.property_id = pcs.property_id)
6. 5,420.217 7,700.235 ↑ 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=2,284.295..2,566.745 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=16138
7. 21.098 2,280.018 ↓ 0.0 0 1

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

8. 0.004 23.544 ↓ 0.0 0 1

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

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

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

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

  • Index Cond: (cid = 3049)
12. 1.821 27.327 ↓ 2.3 870 3

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

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

  • Index Cond: (cid = 3049)
14. 0.060 0.291 ↑ 2.0 14 3

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
15. 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.040..0.077 rows=14 loops=3)

16. 60.640 60.640 ↑ 1.0 1 7,580

Index Scan using pk_call_phone_numbers on call_phone_numbers cpn (cost=0.29..0.32 rows=1 width=8) (actual time=0.008..0.008 rows=1 loops=7,580)

  • Index Cond: (id = c.call_phone_number_id)