explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4Uxk

Settings
# exclusive inclusive rows x rows loops node
1. 1,177.865 1,538.551 ↓ 0.0 0 1

Update on client_kronos.sale (cost=8,296.63..11,683.21 rows=1,000 width=325) (actual time=1,538.550..1,538.551 rows=0 loops=1)

  • Buffers: shared hit=34,206 read=3,610 dirtied=3,133
  • I/O Timings: read=1,028.349
2. 3.565 360.686 ↑ 1.0 1,000 1

Nested Loop (cost=8,296.63..11,683.21 rows=1,000 width=325) (actual time=2.622..360.686 rows=1,000 loops=1)

  • Output: sale.sale_id, sale.client_id, sale.sale_number, sale.company_id, sale.invoice_number, sale.invoice_date, sale.order_date, sale.ship_date, sale.sale_reporting_date, sale.product_id, sale.quantity, sale.uom_type_id, sale.price, sale.reduction, sale.redistributor_company_id, sale.freight, sale.active_range, sale.sell_to_company_number, sale.sell_to_company_name, sale.broker_company_id, sale.company_grouping_id, sale.extended_price_broker_commission, sale.po_number, false, false, sale.ctid, "ANY_subquery".*
  • Inner Unique: true
  • Buffers: shared hit=2,987 read=1,049 dirtied=5
  • I/O Timings: read=339.907
3. 2.143 3.121 ↑ 1.0 1,000 1

HashAggregate (cost=8,296.20..8,306.20 rows=1,000 width=56) (actual time=1.342..3.121 rows=1,000 loops=1)

  • Output: "ANY_subquery".*, "ANY_subquery".sale_id
  • Group Key: "ANY_subquery".sale_id
  • Buffers: shared read=30 dirtied=5
  • I/O Timings: read=0.118
4. 0.300 0.978 ↑ 1.0 1,000 1

Subquery Scan on ANY_subquery (cost=0.00..8,293.70 rows=1,000 width=56) (actual time=0.068..0.978 rows=1,000 loops=1)

  • Output: "ANY_subquery".*, "ANY_subquery".sale_id
  • Buffers: shared read=30 dirtied=5
  • I/O Timings: read=0.118
5. 0.114 0.678 ↑ 1.0 1,000 1

Limit (cost=0.00..8,283.70 rows=1,000 width=16) (actual time=0.062..0.678 rows=1,000 loops=1)

  • Output: sale_1.sale_id
  • Buffers: shared read=30 dirtied=5
  • I/O Timings: read=0.118
6. 0.564 0.564 ↑ 12.3 1,000 1

Seq Scan on client_kronos.sale sale_1 (cost=0.00..101,964.10 rows=12,309 width=16) (actual time=0.061..0.564 rows=1,000 loops=1)

  • Output: sale_1.sale_id
  • Filter: (sale_1.exclude_from_accrual IS NULL)
  • Buffers: shared read=30 dirtied=5
  • I/O Timings: read=0.118
7. 354.000 354.000 ↑ 1.0 1 1,000

Index Scan using sale_pkey on client_kronos.sale (cost=0.43..3.38 rows=1 width=283) (actual time=0.354..0.354 rows=1 loops=1,000)

  • Output: sale.sale_id, sale.client_id, sale.sale_number, sale.company_id, sale.invoice_number, sale.invoice_date, sale.order_date, sale.ship_date, sale.sale_reporting_date, sale.product_id, sale.quantity, sale.uom_type_id, sale.price, sale.reduction, sale.redistributor_company_id, sale.freight, sale.active_range, sale.sell_to_company_number, sale.sell_to_company_name, sale.broker_company_id, sale.company_grouping_id, sale.extended_price_broker_commission, sale.po_number, sale.ctid
  • Index Cond: (sale.sale_id = "ANY_subquery".sale_id)
  • Buffers: shared hit=2,987 read=1,019
  • I/O Timings: read=339.789
Planning time : 1.897 ms
Execution time : 1,538.712 ms