explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1kYY

Settings
# exclusive inclusive rows x rows loops node
1. 10,809.158 160,918.835 ↑ 1.0 6 1

HashAggregate (cost=12,183,283.32..12,183,283.57 rows=6 width=451) (actual time=160,918.828..160,918.835 rows=6 loops=1)

  • Group Key: auction.id
2. 11,568.811 150,109.677 ↑ 2.1 5,292,049 1

Hash Left Join (cost=4,380,969.63..11,747,895.76 rows=10,884,689 width=451) (actual time=59,992.231..150,109.677 rows=5,292,049 loops=1)

  • Hash Cond: (collected_invoices.id = collected_invoices_earlypayments.invoice_id)
3. 18,649.903 131,441.353 ↑ 2.1 5,292,049 1

Hash Left Join (cost=3,955,678.21..9,871,275.12 rows=10,884,689 width=443) (actual time=52,892.686..131,441.353 rows=5,292,049 loops=1)

  • Hash Cond: (all_invoices.id = all_invoices_earlypayments.invoice_id)
4. 9,002.179 104,671.620 ↑ 2.1 5,292,049 1

Hash Left Join (cost=3,493,094.79..8,068,884.50 rows=10,884,689 width=387) (actual time=44,771.032..104,671.620 rows=5,292,049 loops=1)

  • Hash Cond: (all_invoices.id = open_invoices.id)
5. 18,579.775 86,296.131 ↑ 2.1 5,292,049 1

Hash Left Join (cost=2,374,893.31..5,794,656.85 rows=10,884,689 width=367) (actual time=35,396.688..86,296.131 rows=5,292,049 loops=1)

  • Hash Cond: (all_invoices.id = collected_invoices.id)
6. 23,554.138 61,696.505 ↑ 2.1 5,292,049 1

Hash Left Join (cost=1,610,745.69..3,677,928.11 rows=10,884,689 width=359) (actual time=29,376.822..61,696.505 rows=5,292,049 loops=1)

  • Hash Cond: (all_invoices.id = paid_invoices.id)
7. 4,856.513 8,766.493 ↑ 2.1 5,292,049 1

Hash Join (cost=1.14..694,760.79 rows=10,884,689 width=351) (actual time=0.221..8,766.493 rows=5,292,049 loops=1)

  • Hash Cond: (all_invoices.lastauction_id = auction.id)
8. 3,909.967 3,909.967 ↑ 2.1 6,570,050 1

Seq Scan on supplierinvoice all_invoices (cost=0.00..534,871.65 rows=13,610,965 width=351) (actual time=0.019..3,909.967 rows=6,570,050 loops=1)

9. 0.009 0.013 ↑ 1.0 6 1

Hash (cost=1.06..1.06 rows=6 width=8) (actual time=0.013..0.013 rows=6 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
10. 0.004 0.004 ↑ 1.0 6 1

Seq Scan on capfloorauction auction (cost=0.00..1.06 rows=6 width=8) (actual time=0.002..0.004 rows=6 loops=1)

11. 3,026.700 29,375.874 ↑ 2.1 6,249,662 1

Hash (cost=1,382,453.12..1,382,453.12 rows=13,133,155 width=16) (actual time=29,375.874..29,375.874 rows=6,249,662 loops=1)

  • Buckets: 16384 Batches: 256 Memory Usage: 1162kB
12. 8,485.907 26,349.174 ↑ 2.1 6,249,662 1

Hash Left Join (cost=419,075.42..1,382,453.12 rows=13,133,155 width=16) (actual time=7,915.699..26,349.174 rows=6,249,662 loops=1)

  • Hash Cond: (paid_invoices.id = paid_invoices_earlypayments.invoice_id)
13. 9,947.958 9,947.958 ↑ 2.1 6,249,662 1

Seq Scan on supplierinvoice paid_invoices (cost=0.00..636,953.89 rows=13,133,155 width=8) (actual time=0.038..9,947.958 rows=6,249,662 loops=1)

  • Filter: (state = ANY ('{280,250,300,310,320,330}'::integer[]))
  • Rows Removed by Filter: 320388
14. 3,088.220 7,915.309 ↑ 1.0 6,364,552 1

Hash (cost=308,441.52..308,441.52 rows=6,364,552 width=16) (actual time=7,915.309..7,915.309 rows=6,364,552 loops=1)

  • Buckets: 16384 Batches: 128 Memory Usage: 2353kB
15. 4,827.089 4,827.089 ↑ 1.0 6,364,552 1

Seq Scan on earlypaymentsettlement paid_invoices_earlypayments (cost=0.00..308,441.52 rows=6,364,552 width=16) (actual time=0.004..4,827.089 rows=6,364,552 loops=1)

16. 2,583.064 6,019.851 ↑ 2.1 5,761,641 1

Hash (cost=568,899.06..568,899.06 rows=11,900,845 width=8) (actual time=6,019.851..6,019.851 rows=5,761,641 loops=1)

  • Buckets: 16384 Batches: 128 Memory Usage: 1776kB
17. 3,436.787 3,436.787 ↑ 2.1 5,761,641 1

Seq Scan on supplierinvoice collected_invoices (cost=0.00..568,899.06 rows=11,900,845 width=8) (actual time=0.828..3,436.787 rows=5,761,641 loops=1)

  • Filter: (state = ANY ('{310,330}'::integer[]))
  • Rows Removed by Filter: 808409
18. 228.548 9,373.310 ↑ 2.6 487,996 1

Hash (cost=1,093,322.66..1,093,322.66 rows=1,286,625 width=28) (actual time=9,373.310..9,373.310 rows=487,996 loops=1)

  • Buckets: 8192 Batches: 32 Memory Usage: 966kB
19. 3,966.887 9,144.762 ↑ 2.6 487,996 1

Hash Right Join (cost=642,305.99..1,093,322.66 rows=1,286,625 width=28) (actual time=5,830.983..9,144.762 rows=487,996 loops=1)

  • Hash Cond: (open_invoices_earlypayments.invoice_id = open_invoices.id)
20. 3,507.620 3,507.620 ↑ 1.0 6,364,552 1

Seq Scan on earlypaymentsettlement open_invoices_earlypayments (cost=0.00..308,441.52 rows=6,364,552 width=24) (actual time=0.003..3,507.620 rows=6,364,552 loops=1)

21. 224.230 1,670.255 ↑ 2.6 487,996 1

Hash (cost=619,940.18..619,940.18 rows=1,286,625 width=12) (actual time=1,670.255..1,670.255 rows=487,996 loops=1)

  • Buckets: 16384 Batches: 16 Memory Usage: 1448kB
22. 1,446.025 1,446.025 ↑ 2.6 487,996 1

Seq Scan on supplierinvoice open_invoices (cost=0.00..619,940.18 rows=1,286,625 width=12) (actual time=0.020..1,446.025 rows=487,996 loops=1)

  • Filter: (state = ANY ('{50,280,220,300,320}'::integer[]))
  • Rows Removed by Filter: 6082054
23. 3,725.573 8,119.830 ↑ 1.0 6,364,552 1

Hash (cost=308,441.52..308,441.52 rows=6,364,552 width=72) (actual time=8,119.830..8,119.830 rows=6,364,552 loops=1)

  • Buckets: 4096 Batches: 256 Memory Usage: 2563kB
24. 4,394.257 4,394.257 ↑ 1.0 6,364,552 1

Seq Scan on earlypaymentsettlement all_invoices_earlypayments (cost=0.00..308,441.52 rows=6,364,552 width=72) (actual time=0.003..4,394.257 rows=6,364,552 loops=1)

25. 3,468.157 7,099.513 ↑ 1.0 6,364,552 1

Hash (cost=308,441.52..308,441.52 rows=6,364,552 width=24) (actual time=7,099.513..7,099.513 rows=6,364,552 loops=1)

  • Buckets: 8192 Batches: 128 Memory Usage: 2755kB
26. 3,631.356 3,631.356 ↑ 1.0 6,364,552 1

Seq Scan on earlypaymentsettlement collected_invoices_earlypayments (cost=0.00..308,441.52 rows=6,364,552 width=24) (actual time=0.003..3,631.356 rows=6,364,552 loops=1)

Planning time : 3.501 ms
Execution time : 160,919.155 ms