explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XVPT

Settings
# exclusive inclusive rows x rows loops node
1. 2,730.167 164,687.532 ↑ 21.3 68,291 1

Hash Join (cost=4,650,840.73..4,856,660.45 rows=1,456,131 width=47) (actual time=135,698.235..164,687.532 rows=68,291 loops=1)

  • Hash Cond: (maxmt.m_transaction_id = mt.m_transaction_id)
2.          

CTE maxmt

3. 11,492.617 131,909.504 ↑ 21.3 68,291 1

GroupAggregate (cost=3,701,779.01..3,865,593.65 rows=1,456,131 width=29) (actual time=103,835.063..131,909.504 rows=68,291 loops=1)

4. 100,165.235 120,416.887 ↓ 1.0 14,561,868 1

Sort (cost=3,701,779.01..3,738,182.26 rows=14,561,300 width=29) (actual time=103,833.974..120,416.887 rows=14,561,868 loops=1)

  • Sort Key: m_transaction.m_product_id, m_transaction.m_attributesetinstance_id
  • Sort Method: external merge Disk: 555168kB
5. 20,251.652 20,251.652 ↓ 1.0 14,561,868 1

Seq Scan on m_transaction (cost=0.00..575,728.05 rows=14,561,300 width=29) (actual time=0.029..20,251.652 rows=14,561,868 loops=1)

  • Filter: ((m_movementline_id IS NULL) AND (m_productionline_id IS NULL) AND (movementdate <= to_date('2019-05-12 00:00:00.0'::text, 'yyyy-MM-dd'::text)))
6. 132,010.341 132,010.341 ↑ 21.3 68,291 1

CTE Scan on maxmt (cost=0.00..29,122.62 rows=1,456,131 width=58) (actual time=103,835.068..132,010.341 rows=68,291 loops=1)

7. 17,300.214 29,947.024 ↓ 1.0 14,614,989 1

Hash (cost=502,653.37..502,653.37 rows=14,614,937 width=32) (actual time=29,947.024..29,947.024 rows=14,614,989 loops=1)

  • Buckets: 2048 Batches: 1024 Memory Usage: 937kB
8. 12,646.810 12,646.810 ↓ 1.0 14,614,989 1

Seq Scan on m_transaction mt (cost=0.00..502,653.37 rows=14,614,937 width=32) (actual time=0.035..12,646.810 rows=14,614,989 loops=1)