explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Cvo1

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 5.508 201.654 ↓ 19.7 3,937 1

Unique (cost=17,161.97..17,629.01 rows=200 width=29) (actual time=188.911..201.654 rows=3,937 loops=1)

2. 110.284 196.146 ↑ 1.0 91,559 1

Sort (cost=17,161.97..17,395.49 rows=93,407 width=29) (actual time=188.909..196.146 rows=91,559 loops=1)

  • Sort Key: prevendas.codcliente, pf.datahora DESC
  • Sort Method: quicksort Memory: 10226kB
3. 3.529 85.862 ↑ 1.0 91,559 1

Append (cost=2,644.03..9,450.64 rows=93,407 width=29) (actual time=27.311..85.862 rows=91,559 loops=1)

4. 46.521 78.724 ↑ 1.0 91,557 1

Hash Join (cost=2,644.03..7,198.55 rows=91,557 width=21) (actual time=27.311..78.724 rows=91,557 loops=1)

  • Hash Cond: (prevendas.codigo = pf.codprevenda)
5. 5.531 5.531 ↑ 1.0 91,560 1

Seq Scan on prevendas (cost=0.00..3,295.60 rows=91,560 width=13) (actual time=0.003..5.531 rows=91,560 loops=1)

6. 17.567 26.672 ↑ 1.0 91,557 1

Hash (cost=1,499.57..1,499.57 rows=91,557 width=12) (actual time=26.672..26.672 rows=91,557 loops=1)

  • Buckets: 131072 Batches: 1 Memory Usage: 4959kB
7. 9.105 9.105 ↑ 1.0 91,557 1

Seq Scan on prevendas_faturamento pf (cost=0.00..1,499.57 rows=91,557 width=12) (actual time=0.003..9.105 rows=91,557 loops=1)

8. 2.296 3.609 ↑ 925.0 2 1

Hash Join (cost=51.63..1,318.02 rows=1,850 width=22) (actual time=0.135..3.609 rows=2 loops=1)

  • Hash Cond: (saidasnf.codigo = sf.codsaidasnf)
9. 1.302 1.302 ↑ 1.0 22,247 1

Seq Scan on saidasnf (cost=0.00..1,164.47 rows=22,247 width=14) (actual time=0.001..1.302 rows=22,247 loops=1)

10. 0.008 0.011 ↑ 925.0 2 1

Hash (cost=28.50..28.50 rows=1,850 width=12) (actual time=0.011..0.011 rows=2 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 17kB
11. 0.003 0.003 ↑ 925.0 2 1

Seq Scan on saidasnf_faturamento sf (cost=0.00..28.50 rows=1,850 width=12) (actual time=0.003..0.003 rows=2 loops=1)