explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jpWg : Customer_Reports_Mod

Settings
# exclusive inclusive rows x rows loops node
1. 316.872 72,631.725 ↓ 5,421.8 1,084,362 1

Unique (cost=43,166,434,741.37..43,874,126,347.14 rows=200 width=250) (actual time=71,909.098..72,631.725 rows=1,084,362 loops=1)

2. 2,374.079 72,314.853 ↑ 112,853.3 1,254,180 1

Sort (cost=43,166,434,741.37..43,520,280,544.25 rows=141,538,321,153 width=250) (actual time=71,909.096..72,314.853 rows=1,254,180 loops=1)

  • Sort Key: cdrs26.i_cdr, dest.prefix_length DESC
  • Sort Method: quicksort Memory: 382295kB
3. 1,927.394 69,940.774 ↑ 112,853.3 1,254,180 1

Nested Loop (cost=1,367.36..19,763,406.88 rows=141,538,321,153 width=250) (actual time=5,754.095..69,940.774 rows=1,254,180 loops=1)

4. 18,518.264 36,103.663 ↑ 2.2 1,387,379 1

Nested Loop Left Join (cost=1,366.94..1,117,857.65 rows=3,048,002 width=152) (actual time=2.033..36,103.663 rows=1,387,379 loops=1)

5. 585.490 3,225.803 ↓ 3.9 1,196,633 1

Hash Join (cost=1,366.40..88,395.90 rows=304,890 width=140) (actual time=1.669..3,225.803 rows=1,196,633 loops=1)

  • Hash Cond: (cdrs26.i_account = accounts_1.i_account)
6. 596.572 2,639.481 ↓ 2.0 1,196,633 1

Hash Join (cost=683.41..85,334.92 rows=609,780 width=148) (actual time=0.820..2,639.481 rows=1,196,633 loops=1)

  • Hash Cond: (cdrs26.i_account = accounts.i_account)
7. 166.854 2,042.234 ↓ 1.0 1,219,681 1

Append (cost=0.42..79,895.96 rows=1,219,559 width=140) (actual time=0.123..2,042.234 rows=1,219,681 loops=1)

8. 200.885 200.885 ↓ 1.0 130,518 1

Index Scan using cdrs26_i_call on cdrs26 (cost=0.42..8,529.47 rows=130,505 width=140) (actual time=0.122..200.885 rows=130,518 loops=1)

  • Filter: (duration > '0'::double precision)
9. 170.538 170.538 ↓ 1.0 106,675 1

Index Scan using cdrs1_i_call on cdrs1 (cost=0.42..7,010.97 rows=106,664 width=140) (actual time=0.064..170.538 rows=106,675 loops=1)

  • Filter: (duration > '0'::double precision)
10. 138.750 138.750 ↓ 1.0 90,203 1

Index Scan using cdrs119_i_call on cdrs119 (cost=0.29..5,917.17 rows=90,194 width=140) (actual time=0.047..138.750 rows=90,203 loops=1)

  • Filter: (duration > '0'::double precision)
11. 146.899 146.899 ↓ 1.0 95,765 1

Index Scan using cdrs12_i_call on cdrs12 (cost=0.29..6,302.41 rows=95,755 width=140) (actual time=0.049..146.899 rows=95,765 loops=1)

  • Filter: (duration > '0'::double precision)
12. 194.917 194.917 ↓ 1.0 129,304 1

Index Scan using cdrs121_i_call on cdrs121 (cost=0.42..8,465.32 rows=129,291 width=140) (actual time=0.063..194.917 rows=129,304 loops=1)

  • Filter: (duration > '0'::double precision)
13. 124.736 124.736 ↓ 1.0 81,337 1

Index Scan using cdrs122_i_call on cdrs122 (cost=0.29..5,307.76 rows=81,329 width=140) (actual time=0.051..124.736 rows=81,337 loops=1)

  • Filter: (duration > '0'::double precision)
14. 157.541 157.541 ↓ 1.0 98,833 1

Index Scan using cdrs123_i_call on cdrs123 (cost=0.29..6,470.27 rows=98,823 width=140) (actual time=0.046..157.541 rows=98,833 loops=1)

  • Filter: (duration > '0'::double precision)
15. 224.674 224.674 ↓ 1.0 142,452 1

Index Scan using cdrs124_i_call on cdrs124 (cost=0.42..9,294.87 rows=142,438 width=140) (actual time=0.065..224.674 rows=142,452 loops=1)

  • Filter: (duration > '0'::double precision)
16. 70.462 70.462 ↓ 1.0 48,163 1

Index Scan using cdrs125_i_call on cdrs125 (cost=0.29..3,138.75 rows=48,158 width=139) (actual time=0.046..70.462 rows=48,163 loops=1)

  • Filter: (duration > '0'::double precision)
17. 139.832 139.832 ↓ 1.0 93,103 1

Index Scan using cdrs116_i_call on cdrs116 (cost=0.29..6,079.49 rows=93,094 width=140) (actual time=0.050..139.832 rows=93,103 loops=1)

  • Filter: (duration > '0'::double precision)
18. 171.125 171.125 ↓ 1.0 114,696 1

Index Scan using cdrs117_i_call on cdrs117 (cost=0.42..7,533.56 rows=114,685 width=140) (actual time=0.062..171.125 rows=114,696 loops=1)

  • Filter: (duration > '0'::double precision)
19. 135.021 135.021 ↓ 1.0 88,632 1

Index Scan using cdrs126_i_call on cdrs126 (cost=0.29..5,845.93 rows=88,623 width=141) (actual time=0.048..135.021 rows=88,632 loops=1)

  • Filter: (duration > '0'::double precision)
20. 0.123 0.675 ↑ 1.0 260 1

Hash (cost=679.73..679.73 rows=261 width=8) (actual time=0.675..0.675 rows=260 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 19kB
21. 0.451 0.552 ↑ 1.0 260 1

Bitmap Heap Scan on accounts (cost=6.31..679.73 rows=261 width=8) (actual time=0.155..0.552 rows=260 loops=1)

  • Recheck Cond: (i_customer = '1'::bigint)
  • Heap Blocks: exact=203
22. 0.101 0.101 ↑ 1.0 260 1

Bitmap Index Scan on accounts_i_customer (cost=0.00..6.24 rows=261 width=0) (actual time=0.101..0.101 rows=260 loops=1)

  • Index Cond: (i_customer = '1'::bigint)
23. 0.107 0.832 ↑ 1.0 260 1

Hash (cost=679.73..679.73 rows=261 width=8) (actual time=0.832..0.832 rows=260 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 19kB
24. 0.633 0.725 ↑ 1.0 260 1

Bitmap Heap Scan on accounts accounts_1 (cost=6.31..679.73 rows=261 width=8) (actual time=0.155..0.725 rows=260 loops=1)

  • Recheck Cond: (i_customer = '1'::bigint)
  • Heap Blocks: exact=203
25. 0.092 0.092 ↑ 1.0 260 1

Bitmap Index Scan on accounts_i_customer (cost=0.00..6.24 rows=261 width=0) (actual time=0.092..0.092 rows=260 loops=1)

  • Index Cond: (i_customer = '1'::bigint)
26. 14,359.596 14,359.596 ↑ 10.0 1 1,196,633

Index Scan using destinations_prefix2 on destinations dest (cost=0.54..3.28 rows=10 width=12) (actual time=0.011..0.012 rows=1 loops=1,196,633)

  • Index Cond: ((prefix)::text = ANY ((prefixes(cdrs26.prefix))::text[]))
27. 0.000 31,909.717 ↑ 12.0 1 1,387,379

Append (cost=0.42..6.00 rows=12 width=40) (actual time=0.014..0.023 rows=1 loops=1,387,379)

28. 2,774.758 2,774.758 ↓ 0.0 0 1,387,379

Index Scan using calls26_pkey on calls26 (cost=0.42..0.51 rows=1 width=40) (actual time=0.002..0.002 rows=0 loops=1,387,379)

  • Index Cond: (i_call = cdrs26.i_call)
  • Filter: ((setup_time >= '2019-09-24 00:00:00+00'::timestamp with time zone) AND (setup_time <= '2019-10-01 00:00:00+00'::timestamp with time zone))
  • Rows Removed by Filter: 0
29. 2,774.758 2,774.758 ↓ 0.0 0 1,387,379

Index Scan using calls1_pkey on calls1 (cost=0.42..0.50 rows=1 width=41) (actual time=0.002..0.002 rows=0 loops=1,387,379)

  • Index Cond: (i_call = cdrs26.i_call)
  • Filter: ((setup_time >= '2019-09-24 00:00:00+00'::timestamp with time zone) AND (setup_time <= '2019-10-01 00:00:00+00'::timestamp with time zone))
30. 2,774.758 2,774.758 ↓ 0.0 0 1,387,379

Index Scan using calls119_pkey on calls119 (cost=0.42..0.48 rows=1 width=40) (actual time=0.002..0.002 rows=0 loops=1,387,379)

  • Index Cond: (i_call = cdrs26.i_call)
  • Filter: ((setup_time >= '2019-09-24 00:00:00+00'::timestamp with time zone) AND (setup_time <= '2019-10-01 00:00:00+00'::timestamp with time zone))
31. 2,774.758 2,774.758 ↓ 0.0 0 1,387,379

Index Scan using calls12_pkey on calls12 (cost=0.42..0.50 rows=1 width=40) (actual time=0.002..0.002 rows=0 loops=1,387,379)

  • Index Cond: (i_call = cdrs26.i_call)
  • Filter: ((setup_time >= '2019-09-24 00:00:00+00'::timestamp with time zone) AND (setup_time <= '2019-10-01 00:00:00+00'::timestamp with time zone))
32. 2,774.758 2,774.758 ↓ 0.0 0 1,387,379

Index Scan using calls121_pkey on calls121 (cost=0.42..0.50 rows=1 width=40) (actual time=0.002..0.002 rows=0 loops=1,387,379)

  • Index Cond: (i_call = cdrs26.i_call)
  • Filter: ((setup_time >= '2019-09-24 00:00:00+00'::timestamp with time zone) AND (setup_time <= '2019-10-01 00:00:00+00'::timestamp with time zone))
33. 2,774.758 2,774.758 ↓ 0.0 0 1,387,379

Index Scan using calls122_pkey on calls122 (cost=0.42..0.49 rows=1 width=40) (actual time=0.002..0.002 rows=0 loops=1,387,379)

  • Index Cond: (i_call = cdrs26.i_call)
  • Filter: ((setup_time >= '2019-09-24 00:00:00+00'::timestamp with time zone) AND (setup_time <= '2019-10-01 00:00:00+00'::timestamp with time zone))
34. 2,774.758 2,774.758 ↓ 0.0 0 1,387,379

Index Scan using calls123_pkey on calls123 (cost=0.43..0.52 rows=1 width=40) (actual time=0.002..0.002 rows=0 loops=1,387,379)

  • Index Cond: (i_call = cdrs26.i_call)
  • Filter: ((setup_time >= '2019-09-24 00:00:00+00'::timestamp with time zone) AND (setup_time <= '2019-10-01 00:00:00+00'::timestamp with time zone))
35. 2,774.758 2,774.758 ↓ 0.0 0 1,387,379

Index Scan using calls124_pkey on calls124 (cost=0.43..0.52 rows=1 width=40) (actual time=0.002..0.002 rows=0 loops=1,387,379)

  • Index Cond: (i_call = cdrs26.i_call)
  • Filter: ((setup_time >= '2019-09-24 00:00:00+00'::timestamp with time zone) AND (setup_time <= '2019-10-01 00:00:00+00'::timestamp with time zone))
36. 2,774.758 2,774.758 ↓ 0.0 0 1,387,379

Index Scan using calls125_pkey on calls125 (cost=0.42..0.47 rows=1 width=40) (actual time=0.002..0.002 rows=0 loops=1,387,379)

  • Index Cond: (i_call = cdrs26.i_call)
  • Filter: ((setup_time >= '2019-09-24 00:00:00+00'::timestamp with time zone) AND (setup_time <= '2019-10-01 00:00:00+00'::timestamp with time zone))
37. 2,774.758 2,774.758 ↓ 0.0 0 1,387,379

Index Scan using calls116_pkey on calls116 (cost=0.42..0.51 rows=1 width=40) (actual time=0.002..0.002 rows=0 loops=1,387,379)

  • Index Cond: (i_call = cdrs26.i_call)
  • Filter: ((setup_time >= '2019-09-24 00:00:00+00'::timestamp with time zone) AND (setup_time <= '2019-10-01 00:00:00+00'::timestamp with time zone))
38. 2,774.758 2,774.758 ↓ 0.0 0 1,387,379

Index Scan using calls117_pkey on calls117 (cost=0.42..0.49 rows=1 width=40) (actual time=0.002..0.002 rows=0 loops=1,387,379)

  • Index Cond: (i_call = cdrs26.i_call)
  • Filter: ((setup_time >= '2019-09-24 00:00:00+00'::timestamp with time zone) AND (setup_time <= '2019-10-01 00:00:00+00'::timestamp with time zone))
39. 2,774.758 2,774.758 ↓ 0.0 0 1,387,379

Index Scan using calls126_pkey on calls126 (cost=0.42..0.49 rows=1 width=40) (actual time=0.002..0.002 rows=0 loops=1,387,379)

  • Index Cond: (i_call = cdrs26.i_call)
  • Filter: ((setup_time >= '2019-09-24 00:00:00+00'::timestamp with time zone) AND (setup_time <= '2019-10-01 00:00:00+00'::timestamp with time zone))
  • Rows Removed by Filter: 0
Planning time : 17.754 ms
Execution time : 73,985.360 ms