explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ux2z

Settings
# exclusive inclusive rows x rows loops node
1. 0.133 2.288 ↓ 1.7 171 1

Hash Left Join (cost=137.13..870.53 rows=98 width=294) (actual time=0.879..2.288 rows=171 loops=1)

  • Hash Cond: ("order".id = nsi_order.price_order_id)
2. 0.088 1.807 ↓ 1.7 171 1

Nested Loop Left Join (cost=136.07..443.77 rows=98 width=290) (actual time=0.859..1.807 rows=171 loops=1)

3. 0.084 1.719 ↓ 1.7 171 1

Nested Loop Left Join (cost=135.79..392.40 rows=98 width=269) (actual time=0.858..1.719 rows=171 loops=1)

4. 0.094 1.635 ↓ 1.7 171 1

Nested Loop Left Join (cost=135.51..312.67 rows=98 width=265) (actual time=0.857..1.635 rows=171 loops=1)

5. 0.032 1.370 ↓ 1.7 171 1

Nested Loop (cost=135.24..232.94 rows=98 width=228) (actual time=0.853..1.370 rows=171 loops=1)

6. 0.109 0.996 ↓ 1.7 171 1

Hash Join (cost=134.96..158.75 rows=98 width=203) (actual time=0.845..0.996 rows=171 loops=1)

  • Hash Cond: (pos.price_order_id = "order".id)
7. 0.054 0.072 ↓ 1.0 174 1

Bitmap Heap Scan on nsi_price_order_supplier pos (cost=5.62..27.78 rows=173 width=8) (actual time=0.024..0.072 rows=174 loops=1)

  • Recheck Cond: (contragent_id = 11051)
  • Filter: (id IS NOT NULL)
  • Heap Blocks: exact=18
8. 0.018 0.018 ↓ 1.0 174 1

Bitmap Index Scan on nsi_price_order_supplier_contragent_id_idx (cost=0.00..5.58 rows=173 width=0) (actual time=0.018..0.018 rows=174 loops=1)

  • Index Cond: (contragent_id = 11051)
9. 0.328 0.815 ↓ 1.0 1,000 1

Hash (cost=116.95..116.95 rows=991 width=199) (actual time=0.815..0.815 rows=1,000 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 191kB
10. 0.487 0.487 ↓ 1.0 1,000 1

Seq Scan on nsi_price_order "order" (cost=0.00..116.95 rows=991 width=199) (actual time=0.005..0.487 rows=1,000 loops=1)

  • Filter: (status > 1)
  • Rows Removed by Filter: 764
11. 0.342 0.342 ↑ 1.0 1 171

Index Scan using contragents_pkey on contragents c (cost=0.28..0.75 rows=1 width=29) (actual time=0.002..0.002 rows=1 loops=171)

  • Index Cond: (id = "order".customer_id)
12. 0.171 0.171 ↑ 1.0 1 171

Index Scan using users_pkey on users u (cost=0.28..0.80 rows=1 width=41) (actual time=0.001..0.001 rows=1 loops=171)

  • Index Cond: ("order".user_id = id)
13. 0.000 0.000 ↓ 0.0 0 171

Index Scan using users_pkey on users cu (cost=0.28..0.80 rows=1 width=8) (actual time=0.000..0.000 rows=0 loops=171)

  • Index Cond: (id = "order".charge_person)
14. 0.000 0.000 ↓ 0.0 0 171

Index Scan using contragents_pkey on contragents cc (cost=0.28..0.51 rows=1 width=29) (actual time=0.000..0.000 rows=0 loops=171)

  • Index Cond: (id = cu.contragent_id)
15. 0.000 0.006 ↑ 1.0 1 1

Hash (cost=1.04..1.04 rows=1 width=8) (actual time=0.006..0.006 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
16. 0.006 0.006 ↑ 1.0 1 1

Seq Scan on nsi_order (cost=0.00..1.04 rows=1 width=8) (actual time=0.005..0.006 rows=1 loops=1)

  • Filter: ((status <> 10) AND (supplier_id = 11051))
  • Rows Removed by Filter: 9
17.          

SubPlan (forHash Left Join)

18. 0.171 0.342 ↑ 1.0 1 171

Aggregate (cost=4.32..4.33 rows=1 width=0) (actual time=0.002..0.002 rows=1 loops=171)

19. 0.171 0.171 ↑ 1.0 2 171

Index Only Scan using nsi_price_order_positions_order_id_idx_btree on nsi_price_order_positions popos (cost=0.28..4.31 rows=2 width=0) (actual time=0.001..0.001 rows=2 loops=171)

  • Index Cond: (price_order_id = "order".id)
  • Heap Fetches: 87