explain.depesz.com

PostgreSQL's explain analyze made readable

Result: a7nD

Settings
# exclusive inclusive rows x rows loops node
1. 62.943 795,790.873 ↑ 1.0 500,000 1

Limit (cost=583,531.22..1,030,297.19 rows=500,000 width=282) (actual time=793,217.387..795,790.873 rows=500,000 loops=1)

2. 2,228.423 795,727.930 ↑ 7.2 500,000 1

Gather (cost=583,531.22..3,794,607.08 rows=3,593,689 width=282) (actual time=793,217.386..795,727.930 rows=500,000 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
3. 8,594.314 793,499.507 ↑ 9.0 100,033 5 / 5

Parallel Hash Join (cost=582,531.22..3,434,238.18 rows=898,422 width=282) (actual time=792,627.781..793,499.507 rows=100,033 loops=5)

  • Hash Cond: (bcr_5.id = tkts_2.tem_registro_consumo_id)
  • Join Filter: (to_char(CASE WHEN (tkts_2.last_update > bcr_5.last_update) THEN tkts_2.last_update ELSE bcr_5.last_update END, 'yyyymmdd'::text) >= '20191201'::text)
  • Rows Removed by Join Filter: 107070
4. 734.976 588,028.275 ↑ 1.2 6,467,556 5 / 5

Parallel Append (cost=0.14..2,484,219.67 rows=8,074,868 width=102) (actual time=191.808..588,028.275 rows=6,467,556 loops=5)

5. 0.002 0.002 ↓ 0.0 0 1 / 5

Parallel Index Scan using tem_registro_consumo_p2020_02_pkey on tem_registro_consumo_p2020_02 bcr_5 (cost=0.14..8.26 rows=1 width=1,852) (actual time=0.010..0.010 rows=0 loops=1)

  • Filter: ((status)::text = 'CHAMADA_TARIFADA'::text)
6. 0.001 0.001 ↓ 0.0 0 1 / 5

Parallel Index Scan using tem_registro_consumo_p2020_03_pkey on tem_registro_consumo_p2020_03 bcr_6 (cost=0.14..8.26 rows=1 width=1,852) (actual time=0.003..0.003 rows=0 loops=1)

  • Filter: ((status)::text = 'CHAMADA_TARIFADA'::text)
7. 0.001 0.001 ↓ 0.0 0 1 / 5

Parallel Index Scan using tem_registro_consumo_p2020_04_pkey on tem_registro_consumo_p2020_04 bcr_7 (cost=0.14..8.26 rows=1 width=1,852) (actual time=0.005..0.005 rows=0 loops=1)

  • Filter: ((status)::text = 'CHAMADA_TARIFADA'::text)
8. 0.000 0.000 ↓ 0.0 0 1 / 5

Parallel Index Scan using tem_registro_consumo_p2020_05_pkey on tem_registro_consumo_p2020_05 bcr_8 (cost=0.14..8.26 rows=1 width=1,852) (actual time=0.002..0.002 rows=0 loops=1)

  • Filter: ((status)::text = 'CHAMADA_TARIFADA'::text)
9. 0.001 0.001 ↓ 0.0 0 1 / 5

Parallel Index Scan using tem_registro_consumo_p2020_06_pkey on tem_registro_consumo_p2020_06 bcr_9 (cost=0.14..8.26 rows=1 width=1,852) (actual time=0.003..0.003 rows=0 loops=1)

  • Filter: ((status)::text = 'CHAMADA_TARIFADA'::text)
10. 254,594.905 254,594.905 ↑ 1.2 2,251,539 5 / 5

Parallel Seq Scan on tem_registro_consumo_p2019_12 bcr_3 (cost=0.00..972,608.18 rows=2,782,545 width=101) (actual time=8,621.109..254,594.905 rows=2,251,539 loops=5)

  • Filter: ((status)::text = 'CHAMADA_TARIFADA'::text)
  • Rows Removed by Filter: 5706844
11. 141,127.227 141,127.227 ↓ 1.3 5,717,864 3 / 5

Parallel Seq Scan on tem_registro_consumo_p2019_11 bcr_2 (cost=0.00..705,035.41 rows=4,295,948 width=102) (actual time=126.225..235,212.045 rows=5,717,864 loops=3)

  • Filter: ((status)::text = 'CHAMADA_TARIFADA'::text)
  • Rows Removed by Filter: 3813813
12. 191,311.725 191,311.725 ↓ 2.0 1,963,247 2 / 5

Parallel Seq Scan on tem_registro_consumo_p2020_01 bcr_4 (cost=0.00..671,104.46 rows=996,372 width=102) (actual time=44.317..478,279.312 rows=1,963,247 loops=2)

  • Filter: ((status)::text = 'CHAMADA_TARIFADA'::text)
  • Rows Removed by Filter: 10575428
13. 155.182 155.182 ↓ 0.0 0 2 / 5

Parallel Seq Scan on tem_registro_consumo_p2019_09 bcr_11 (cost=0.00..56,687.30 rows=1 width=95) (actual time=387.956..387.956 rows=0 loops=2)

  • Filter: ((status)::text = 'CHAMADA_TARIFADA'::text)
  • Rows Removed by Filter: 1404631
14. 104.196 104.196 ↓ 0.0 0 1 / 5

Parallel Seq Scan on tem_registro_consumo_p2019_10 bcr_1 (cost=0.00..38,341.23 rows=1 width=95) (actual time=520.978..520.978 rows=0 loops=1)

  • Filter: ((status)::text = 'CHAMADA_TARIFADA'::text)
  • Rows Removed by Filter: 1875531
15. 0.059 0.059 ↑ 1.0 1 1 / 5

Parallel Seq Scan on tem_registro_consumo_p2000_01 bcr_10 (cost=0.00..27.46 rows=1 width=90) (actual time=0.272..0.296 rows=1 loops=1)

  • Filter: ((status)::text = 'CHAMADA_TARIFADA'::text)
  • Rows Removed by Filter: 1285
16. 0.000 0.000 ↓ 0.0 0 1 / 5

Parallel Seq Scan on tem_registro_consumo bcr (cost=0.00..0.00 rows=1 width=101) (actual time=0.001..0.002 rows=0 loops=1)

  • Filter: ((status)::text = 'CHAMADA_TARIFADA'::text)
17. 7,035.993 196,876.918 ↓ 2.4 6,467,556 5 / 5

Parallel Hash (cost=525,151.28..525,151.28 rows=2,695,265 width=48) (actual time=196,876.918..196,876.918 rows=6,467,556 loops=5)

  • Buckets: 1048576 (originally 1048576) Batches: 64 (originally 16) Memory Usage: 49248kB
18. 713.556 189,840.925 ↓ 2.4 6,467,556 5 / 5

Parallel Append (cost=0.00..525,151.28 rows=2,695,265 width=48) (actual time=0.019..189,840.925 rows=6,467,556 loops=5)

19. 121,936.609 121,936.609 ↓ 2.4 3,430,719 5 / 5

Parallel Seq Scan on bill_tickets_p2019_11 tkts_2 (cost=0.00..273,498.91 rows=1,429,491 width=48) (actual time=14.256..121,936.609 rows=3,430,719 loops=5)

  • Filter: (COALESCE(id_tem_bill_ivn_central, '-1'::integer) > 0)
20. 66,794.662 66,794.662 ↓ 4.0 3,752,565 3 / 5

Parallel Seq Scan on bill_tickets_p2019_12 tkts_3 (cost=0.00..176,863.97 rows=938,239 width=47) (actual time=12.847..111,324.436 rows=3,752,565 loops=3)

  • Filter: (COALESCE(id_tem_bill_ivn_central, '-1'::integer) > 0)
21. 396.098 396.098 ↓ 6.0 1,963,247 2 / 5

Parallel Seq Scan on bill_tickets_p2020_01 tkts_4 (cost=0.00..61,223.40 rows=327,211 width=47) (actual time=0.009..990.245 rows=1,963,247 loops=2)

  • Filter: (COALESCE(id_tem_bill_ivn_central, '-1'::integer) > 0)
22. 0.000 0.000 ↓ 0.0 0 1 / 5

Parallel Seq Scan on bill_tickets_p2019_10 tkts_1 (cost=0.00..14.78 rows=128 width=64) (actual time=0.000..0.000 rows=0 loops=1)

  • Filter: (COALESCE(id_tem_bill_ivn_central, '-1'::integer) > 0)
23. 0.000 0.000 ↓ 0.0 0 1 / 5

Parallel Seq Scan on bill_tickets_p2020_02 tkts_5 (cost=0.00..14.78 rows=128 width=64) (actual time=0.000..0.001 rows=0 loops=1)

  • Filter: (COALESCE(id_tem_bill_ivn_central, '-1'::integer) > 0)
24. 0.000 0.000 ↓ 0.0 0 1 / 5

Parallel Seq Scan on bill_tickets_p2020_03 tkts_6 (cost=0.00..14.78 rows=128 width=64) (actual time=0.000..0.001 rows=0 loops=1)

  • Filter: (COALESCE(id_tem_bill_ivn_central, '-1'::integer) > 0)
25. 0.000 0.000 ↓ 0.0 0 1 / 5

Parallel Seq Scan on bill_tickets_p2020_04 tkts_7 (cost=0.00..14.78 rows=128 width=64) (actual time=0.000..0.000 rows=0 loops=1)

  • Filter: (COALESCE(id_tem_bill_ivn_central, '-1'::integer) > 0)
26. 0.000 0.000 ↓ 0.0 0 1 / 5

Parallel Seq Scan on bill_tickets_p2020_05 tkts_8 (cost=0.00..14.78 rows=128 width=64) (actual time=0.000..0.000 rows=0 loops=1)

  • Filter: (COALESCE(id_tem_bill_ivn_central, '-1'::integer) > 0)
27. 0.000 0.000 ↓ 0.0 0 1 / 5

Parallel Seq Scan on bill_tickets_p2020_06 tkts_9 (cost=0.00..14.78 rows=128 width=64) (actual time=0.000..0.000 rows=0 loops=1)

  • Filter: (COALESCE(id_tem_bill_ivn_central, '-1'::integer) > 0)
28. 0.000 0.000 ↓ 0.0 0 1 / 5

Parallel Seq Scan on bill_tickets tkts (cost=0.00..0.00 rows=1 width=47) (actual time=0.002..0.002 rows=0 loops=1)

  • Filter: (COALESCE(id_tem_bill_ivn_central, '-1'::integer) > 0)
Planning time : 2.195 ms
Execution time : 795,829.392 ms