explain.depesz.com

PostgreSQL's explain analyze made readable

Result: x4yb : Customer_Reports

Settings
# exclusive inclusive rows x rows loops node
1. 314.919 75,789.922 ↓ 5,421.8 1,084,362 1

Unique (cost=111,248,578,511.25..111,956,270,117.02 rows=200 width=250) (actual time=74,974.531..75,789.922 rows=1,084,362 loops=1)

2. 3,378.153 75,475.003 ↑ 112,853.3 1,254,180 1

Sort (cost=111,248,578,511.25..111,602,424,314.14 rows=141,538,321,153 width=250) (actual time=74,974.529..75,475.003 rows=1,254,180 loops=1)

  • Sort Key: cdrs26.i_cdr, (length((dest.prefix)::text)) DESC
  • Sort Method: external sort Disk: 241976kB
3. 1,998.256 72,096.850 ↑ 112,853.3 1,254,180 1

Nested Loop (cost=1,367.36..373,608,958.77 rows=141,538,321,153 width=250) (actual time=6,134.140..72,096.850 rows=1,254,180 loops=1)

4. 18,913.147 36,801.498 ↑ 2.2 1,387,379 1

Nested Loop Left Join (cost=1,366.94..1,117,606.65 rows=3,048,002 width=148) (actual time=8.617..36,801.498 rows=1,387,379 loops=1)

5. 578.858 3,528.755 ↓ 3.9 1,196,633 1

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

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

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

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

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

8. 264.671 264.671 ↓ 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.164..264.671 rows=130,518 loops=1)

  • Filter: (duration > '0'::double precision)
9. 205.040 205.040 ↓ 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.072..205.040 rows=106,675 loops=1)

  • Filter: (duration > '0'::double precision)
10. 156.685 156.685 ↓ 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.054..156.685 rows=90,203 loops=1)

  • Filter: (duration > '0'::double precision)
11. 179.611 179.611 ↓ 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.044..179.611 rows=95,765 loops=1)

  • Filter: (duration > '0'::double precision)
12. 233.310 233.310 ↓ 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.062..233.310 rows=129,304 loops=1)

  • Filter: (duration > '0'::double precision)
13. 150.861 150.861 ↓ 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.049..150.861 rows=81,337 loops=1)

  • Filter: (duration > '0'::double precision)
14. 174.784 174.784 ↓ 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.047..174.784 rows=98,833 loops=1)

  • Filter: (duration > '0'::double precision)
15. 247.147 247.147 ↓ 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.055..247.147 rows=142,452 loops=1)

  • Filter: (duration > '0'::double precision)
16. 78.359 78.359 ↓ 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.049..78.359 rows=48,163 loops=1)

  • Filter: (duration > '0'::double precision)
17. 163.242 163.242 ↓ 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.052..163.242 rows=93,103 loops=1)

  • Filter: (duration > '0'::double precision)
18. 188.636 188.636 ↓ 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..188.636 rows=114,696 loops=1)

  • Filter: (duration > '0'::double precision)
19. 148.133 148.133 ↓ 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.058..148.133 rows=88,632 loops=1)

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

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

  • Buckets: 1024 Batches: 1 Memory Usage: 19kB
21. 0.481 0.593 ↑ 1.0 260 1

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

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

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

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

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

  • Buckets: 1024 Batches: 1 Memory Usage: 19kB
24. 6.709 6.884 ↑ 1.0 260 1

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

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

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

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

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

  • Index Cond: (prefix = ANY ((prefixes(cdrs26.prefix))::text[]))
  • Heap Fetches: 1387376
27. 0.000 33,297.096 ↑ 12.0 1 1,387,379

Append (cost=0.42..6.00 rows=12 width=40) (actual time=0.015..0.024 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 : 44.749 ms
Execution time : 77,090.744 ms