explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BUTL

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 1.621 ↓ 0.0 0 1

GroupAggregate (cost=880.18..883.08 rows=116 width=158) (actual time=1.621..1.621 rows=0 loops=1)

  • Group Key: dt2.doc_type_name, de.doc_type_id, mm.supplier_contract_id
2.          

CTE cte

3. 1.073 1.190 ↑ 1.0 1 1

Aggregate (cost=3.44..3.45 rows=1 width=32) (actual time=1.190..1.190 rows=1 loops=1)

4. 0.080 0.117 ↑ 1.0 100 1

Subquery Scan on a (cost=0.00..2.93 rows=100 width=61) (actual time=0.045..0.117 rows=100 loops=1)

5. 0.012 0.037 ↑ 1.0 100 1

Limit (cost=0.00..1.93 rows=100 width=37) (actual time=0.013..0.037 rows=100 loops=1)

6. 0.025 0.025 ↑ 11,002.0 100 1

Seq Scan on money_movement (cost=0.00..21,285.00 rows=1,100,200 width=37) (actual time=0.012..0.025 rows=100 loops=1)

7. 0.009 1.619 ↓ 0.0 0 1

Sort (cost=876.73..877.02 rows=116 width=129) (actual time=1.619..1.619 rows=0 loops=1)

  • Sort Key: dt2.doc_type_name, de.doc_type_id, mm.supplier_contract_id
  • Sort Method: quicksort Memory: 25kB
8. 0.000 1.610 ↓ 0.0 0 1

Hash Join (cost=26.74..872.75 rows=116 width=129) (actual time=1.610..1.610 rows=0 loops=1)

  • Hash Cond: (de.doc_type_id = dt2.doc_type_id)
9. 0.023 1.610 ↓ 0.0 0 1

Hash Join (cost=4.59..849.14 rows=116 width=11) (actual time=1.610..1.610 rows=0 loops=1)

  • Hash Cond: (mm.doc_edit_id = de.doc_edit_id)
10. 0.057 1.540 ↑ 1.2 100 1

Nested Loop (cost=0.43..843.52 rows=116 width=11) (actual time=1.282..1.540 rows=100 loops=1)

11. 0.016 1.283 ↑ 1.0 100 1

Nested Loop (cost=0.00..2.02 rows=100 width=4) (actual time=1.259..1.283 rows=100 loops=1)

12. 1.203 1.203 ↑ 1.0 1 1

CTE Scan on cte (cost=0.00..0.02 rows=1 width=32) (actual time=1.203..1.203 rows=1 loops=1)

13. 0.064 0.064 ↑ 1.0 100 1

Function Scan on jsonb_to_recordset l (cost=0.00..1.00 rows=100 width=4) (actual time=0.054..0.064 rows=100 loops=1)

14. 0.200 0.200 ↑ 1.0 1 100

Index Scan using idx_money_movement_supplier_contract_id on money_movement mm (cost=0.43..8.40 rows=1 width=11) (actual time=0.002..0.002 rows=1 loops=100)

  • Index Cond: (supplier_contract_id = l.supplier_contract_id)
15. 0.020 0.047 ↓ 1.0 97 1

Hash (cost=2.96..2.96 rows=96 width=8) (actual time=0.047..0.047 rows=97 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
16. 0.027 0.027 ↓ 1.0 97 1

Seq Scan on document_edition de (cost=0.00..2.96 rows=96 width=8) (actual time=0.011..0.027 rows=97 loops=1)

17. 0.000 0.000 ↓ 0.0 0

Hash (cost=15.40..15.40 rows=540 width=122) (never executed)

18. 0.000 0.000 ↓ 0.0 0

Seq Scan on document_type dt2 (cost=0.00..15.40 rows=540 width=122) (never executed)