explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Nb6C

Settings
# exclusive inclusive rows x rows loops node
1. 0.018 214.706 ↑ 59.7 82 1

Append (cost=0.00..16,849.55 rows=4,899 width=128) (actual time=0.003..214.706 rows=82 loops=1)

2. 0.001 0.001 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=128) (actual time=0.001..0.001 rows=1 loops=1)

3. 0.001 0.001 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=128) (actual time=0.001..0.001 rows=1 loops=1)

4. 0.013 61.695 ↑ 81.5 30 1

Subquery Scan on *SELECT* 3 (cost=3,384.60..3,415.15 rows=2,444 width=128) (actual time=61.683..61.695 rows=30 loops=1)

5. 0.083 61.682 ↑ 81.5 30 1

Sort (cost=3,384.60..3,390.71 rows=2,444 width=118) (actual time=61.679..61.682 rows=30 loops=1)

  • Sort Key: levy.product_pim_lb, ((levy.amount_no)::character varying)
  • Sort Method: quicksort Memory: 27kB
6. 13.934 61.599 ↑ 81.5 30 1

HashAggregate (cost=3,179.85..3,247.06 rows=2,444 width=118) (actual time=61.578..61.599 rows=30 loops=1)

  • Group Key: levy.product_pim_lb, (levy.amount_no)::character varying
7. 8.103 47.665 ↑ 1.0 24,159 1

Subquery Scan on levy (cost=2,324.52..2,935.47 rows=24,438 width=59) (actual time=29.101..47.665 rows=24,159 loops=1)

8. 24.567 39.562 ↑ 1.0 24,159 1

HashAggregate (cost=2,324.52..2,568.90 rows=24,438 width=32) (actual time=29.093..39.562 rows=24,159 loops=1)

  • Group Key: COALESCE(levy_1.validate_fg, levy_1.validate_fg, true), levy_1.plv_levy_id, levy_1.product_pim_lb, levy_1.amount_no
9. 14.995 14.995 ↑ 1.0 24,438 1

Seq Scan on levy levy_1 (cost=0.00..2,080.14 rows=24,438 width=32) (actual time=0.068..14.995 rows=24,438 loops=1)

  • Filter: (((tec_source_lb)::text <> 'bo_controle'::text) AND (campaign_dt = '2018-11-05'::date))
  • Rows Removed by Filter: 38
10. 0.003 50.012 ↑ 1.0 1 1

Subquery Scan on *SELECT* 4 (cost=2,935.47..2,935.50 rows=1 width=128) (actual time=50.011..50.012 rows=1 loops=1)

11. 7.155 50.009 ↑ 1.0 1 1

Aggregate (cost=2,935.47..2,935.49 rows=1 width=128) (actual time=50.009..50.009 rows=1 loops=1)

12. 26.567 42.854 ↑ 1.0 24,159 1

HashAggregate (cost=2,324.52..2,568.90 rows=24,438 width=32) (actual time=33.822..42.854 rows=24,159 loops=1)

  • Group Key: COALESCE(levy_2.validate_fg, levy_2.validate_fg, true), levy_2.plv_levy_id, levy_2.product_pim_lb, levy_2.amount_no
13. 16.287 16.287 ↑ 1.0 24,438 1

Seq Scan on levy levy_2 (cost=0.00..2,080.14 rows=24,438 width=32) (actual time=0.043..16.287 rows=24,438 loops=1)

  • Filter: (((tec_source_lb)::text <> 'bo_controle'::text) AND (campaign_dt = '2018-11-05'::date))
  • Rows Removed by Filter: 38
14. 0.001 0.001 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=128) (actual time=0.001..0.001 rows=1 loops=1)

15. 0.001 0.001 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=128) (actual time=0.001..0.001 rows=1 loops=1)

16. 0.001 0.001 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=128) (actual time=0.001..0.001 rows=1 loops=1)

17. 0.007 54.114 ↑ 40.7 30 1

Subquery Scan on *SELECT* 8 (cost=2,726.26..2,741.53 rows=1,222 width=128) (actual time=54.105..54.114 rows=30 loops=1)

18. 0.088 54.107 ↑ 40.7 30 1

Sort (cost=2,726.26..2,729.31 rows=1,222 width=118) (actual time=54.103..54.107 rows=30 loops=1)

  • Sort Key: levy_3.product_pim_lb, ((levy_3.amount_no)::character varying)
  • Sort Method: quicksort Memory: 27kB
19. 10.784 54.019 ↑ 40.7 30 1

HashAggregate (cost=2,629.99..2,663.60 rows=1,222 width=118) (actual time=54.003..54.019 rows=30 loops=1)

  • Group Key: levy_3.product_pim_lb, (levy_3.amount_no)::character varying
20. 6.486 43.235 ↓ 2.0 23,976 1

Subquery Scan on levy_3 (cost=2,202.33..2,507.80 rows=12,219 width=59) (actual time=28.801..43.235 rows=23,976 loops=1)

21. 21.442 36.749 ↓ 2.0 23,976 1

HashAggregate (cost=2,202.33..2,324.52 rows=12,219 width=32) (actual time=28.790..36.749 rows=23,976 loops=1)

  • Group Key: COALESCE(levy_4.validate_fg, levy_4.validate_fg, true), levy_4.plv_levy_id, levy_4.product_pim_lb, levy_4.amount_no
22. 15.307 15.307 ↓ 2.0 23,993 1

Seq Scan on levy levy_4 (cost=0.00..2,080.14 rows=12,219 width=32) (actual time=0.045..15.307 rows=23,993 loops=1)

  • Filter: ((COALESCE(validate_fg, validate_fg, true) IS TRUE) AND ((tec_source_lb)::text <> 'bo_controle'::text) AND (campaign_dt = '2018-11-05'::date))
  • Rows Removed by Filter: 483
23. 0.003 38.357 ↑ 1.0 1 1

Subquery Scan on *SELECT* 9 (cost=2,507.81..2,507.84 rows=1 width=128) (actual time=38.356..38.357 rows=1 loops=1)

24. 4.951 38.354 ↑ 1.0 1 1

Aggregate (cost=2,507.81..2,507.83 rows=1 width=128) (actual time=38.354..38.354 rows=1 loops=1)

25. 19.840 33.403 ↓ 2.0 23,976 1

HashAggregate (cost=2,202.33..2,324.52 rows=12,219 width=32) (actual time=26.490..33.403 rows=23,976 loops=1)

  • Group Key: COALESCE(levy_5.validate_fg, levy_5.validate_fg, true), levy_5.plv_levy_id, levy_5.product_pim_lb, levy_5.amount_no
26. 13.563 13.563 ↓ 2.0 23,993 1

Seq Scan on levy levy_5 (cost=0.00..2,080.14 rows=12,219 width=32) (actual time=0.047..13.563 rows=23,993 loops=1)

  • Filter: ((COALESCE(validate_fg, validate_fg, true) IS TRUE) AND ((tec_source_lb)::text <> 'bo_controle'::text) AND (campaign_dt = '2018-11-05'::date))
  • Rows Removed by Filter: 483
27. 0.001 0.001 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=128) (actual time=0.001..0.001 rows=1 loops=1)

28. 0.001 0.001 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=128) (actual time=0.001..0.001 rows=1 loops=1)

29. 0.000 0.000 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=128) (actual time=0.000..0.000 rows=1 loops=1)

30. 0.002 5.358 ↑ 111.1 11 1

Subquery Scan on *SELECT* 13 (cost=2,726.26..2,741.53 rows=1,222 width=128) (actual time=5.355..5.358 rows=11 loops=1)

31. 0.040 5.356 ↑ 111.1 11 1

Sort (cost=2,726.26..2,729.31 rows=1,222 width=118) (actual time=5.353..5.356 rows=11 loops=1)

  • Sort Key: levy_6.product_pim_lb, ((levy_6.amount_no)::character varying)
  • Sort Method: quicksort Memory: 25kB
32. 0.127 5.316 ↑ 111.1 11 1

HashAggregate (cost=2,629.99..2,663.60 rows=1,222 width=118) (actual time=5.306..5.316 rows=11 loops=1)

  • Group Key: levy_6.product_pim_lb, (levy_6.amount_no)::character varying
33. 0.059 5.189 ↑ 66.8 183 1

Subquery Scan on levy_6 (cost=2,202.33..2,507.80 rows=12,219 width=59) (actual time=5.100..5.189 rows=183 loops=1)

34. 0.277 5.130 ↑ 66.8 183 1

HashAggregate (cost=2,202.33..2,324.52 rows=12,219 width=32) (actual time=5.084..5.130 rows=183 loops=1)

  • Group Key: COALESCE(levy_7.validate_fg, levy_7.validate_fg, true), levy_7.plv_levy_id, levy_7.product_pim_lb, levy_7.amount_no
35. 4.853 4.853 ↑ 27.5 445 1

Seq Scan on levy levy_7 (cost=0.00..2,080.14 rows=12,219 width=32) (actual time=0.710..4.853 rows=445 loops=1)

  • Filter: ((COALESCE(validate_fg, validate_fg, true) IS FALSE) AND ((tec_source_lb)::text <> 'bo_controle'::text) AND (campaign_dt = '2018-11-05'::date))
  • Rows Removed by Filter: 24031
36. 0.001 5.145 ↑ 1.0 1 1

Subquery Scan on *SELECT* 14 (cost=2,507.81..2,507.84 rows=1 width=128) (actual time=5.145..5.145 rows=1 loops=1)

37. 0.056 5.144 ↑ 1.0 1 1

Aggregate (cost=2,507.81..2,507.83 rows=1 width=128) (actual time=5.144..5.144 rows=1 loops=1)

38. 0.338 5.088 ↑ 66.8 183 1

HashAggregate (cost=2,202.33..2,324.52 rows=12,219 width=32) (actual time=5.031..5.088 rows=183 loops=1)

  • Group Key: COALESCE(levy_8.validate_fg, levy_8.validate_fg, true), levy_8.plv_levy_id, levy_8.product_pim_lb, levy_8.amount_no
39. 4.750 4.750 ↑ 27.5 445 1

Seq Scan on levy levy_8 (cost=0.00..2,080.14 rows=12,219 width=32) (actual time=0.664..4.750 rows=445 loops=1)

  • Filter: ((COALESCE(validate_fg, validate_fg, true) IS FALSE) AND ((tec_source_lb)::text <> 'bo_controle'::text) AND (campaign_dt = '2018-11-05'::date))
  • Rows Removed by Filter: 24031
Planning time : 0.777 ms