explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 61hs

Settings
# exclusive inclusive rows x rows loops node
1. 0.013 0.329 ↑ 1.0 1 1

Nested Loop Left Join (cost=15.86..51.46 rows=1 width=5,233) (actual time=0.311..0.329 rows=1 loops=1)

  • Join Filter: (essays_order.id = discounts_discount_order_relation.order_id)
2. 0.011 0.296 ↑ 1.0 1 1

Nested Loop Left Join (cost=15.86..46.82 rows=1 width=5,199) (actual time=0.278..0.296 rows=1 loops=1)

  • Join Filter: (essays_order.id = refunds_orders_relation.order_id)
3. 0.013 0.280 ↑ 1.0 1 1

Nested Loop Left Join (cost=15.59..38.52 rows=1 width=5,149) (actual time=0.262..0.280 rows=1 loops=1)

  • Join Filter: (essays_order.id = essays_order_available.order_id)
4. 0.013 0.263 ↑ 1.0 1 1

Nested Loop Left Join (cost=15.31..30.21 rows=1 width=5,107) (actual time=0.246..0.263 rows=1 loops=1)

  • Join Filter: (essays_order.product_type_id = essays_product_type.id)
  • Rows Removed by Join Filter: 7
5. 0.010 0.244 ↑ 1.0 1 1

Nested Loop (cost=15.31..28.52 rows=1 width=4,470) (actual time=0.227..0.244 rows=1 loops=1)

6. 0.008 0.228 ↑ 1.0 1 1

Nested Loop (cost=15.04..28.20 rows=1 width=2,157) (actual time=0.211..0.228 rows=1 loops=1)

7. 0.009 0.205 ↑ 1.0 1 1

Nested Loop (cost=14.76..19.90 rows=1 width=1,681) (actual time=0.188..0.205 rows=1 loops=1)

  • Join Filter: (essays_order.standard_id = essays_standard.id)
  • Rows Removed by Join Filter: 15
8. 0.026 0.190 ↑ 1.0 1 1

Hash Join (cost=14.76..18.47 rows=1 width=1,446) (actual time=0.173..0.190 rows=1 loops=1)

  • Hash Cond: (essays_papersubject.id = essays_order.paper_subject_id)
9. 0.041 0.041 ↑ 1.0 124 1

Seq Scan on essays_papersubject (cost=0.00..3.24 rows=124 width=41) (actual time=0.018..0.041 rows=124 loops=1)

10. 0.004 0.123 ↑ 1.0 1 1

Hash (cost=14.75..14.75 rows=1 width=1,405) (actual time=0.123..0.123 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
11. 0.019 0.119 ↑ 1.0 1 1

Hash Join (cost=11.29..14.75 rows=1 width=1,405) (actual time=0.116..0.119 rows=1 loops=1)

  • Hash Cond: (essays_typeofwork.id = essays_order.type_of_work_id)
12. 0.029 0.029 ↑ 1.0 105 1

Seq Scan on essays_typeofwork (cost=0.00..3.05 rows=105 width=101) (actual time=0.008..0.029 rows=105 loops=1)

13. 0.004 0.071 ↑ 1.0 1 1

Hash (cost=11.28..11.28 rows=1 width=1,304) (actual time=0.071..0.071 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
14. 0.013 0.067 ↑ 1.0 1 1

Hash Join (cost=9.80..11.28 rows=1 width=1,304) (actual time=0.065..0.067 rows=1 loops=1)

  • Hash Cond: (essays_levelwork.id = essays_order.level_work_id)
15. 0.007 0.007 ↑ 1.0 34 1

Seq Scan on essays_levelwork (cost=0.00..1.34 rows=34 width=315) (actual time=0.004..0.007 rows=34 loops=1)

16. 0.003 0.047 ↑ 1.0 1 1

Hash (cost=9.79..9.79 rows=1 width=989) (actual time=0.047..0.047 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
17. 0.015 0.044 ↑ 1.0 1 1

Hash Join (cost=8.31..9.79 rows=1 width=989) (actual time=0.042..0.044 rows=1 loops=1)

  • Hash Cond: (essays_urgency.id = essays_order.urgency_id)
18. 0.007 0.007 ↑ 1.0 37 1

Seq Scan on essays_urgency (cost=0.00..1.37 rows=37 width=155) (actual time=0.004..0.007 rows=37 loops=1)

19. 0.005 0.022 ↑ 1.0 1 1

Hash (cost=8.30..8.30 rows=1 width=834) (actual time=0.022..0.022 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
20. 0.017 0.017 ↑ 1.0 1 1

Index Scan using essays_order_pkey on essays_order (cost=0.28..8.30 rows=1 width=834) (actual time=0.016..0.017 rows=1 loops=1)

  • Index Cond: (id = 11,840)
21. 0.006 0.006 ↑ 1.2 16 1

Seq Scan on essays_standard (cost=0.00..1.19 rows=19 width=235) (actual time=0.004..0.006 rows=16 loops=1)

22. 0.015 0.015 ↑ 1.0 1 1

Index Scan using customers_customer_pkey on customers_customer (cost=0.28..8.30 rows=1 width=476) (actual time=0.015..0.015 rows=1 loops=1)

  • Index Cond: (id = essays_order.customer_id)
23. 0.006 0.006 ↑ 1.0 1 1

Index Scan using core_site_pkey on core_site (cost=0.28..0.31 rows=1 width=2,313) (actual time=0.006..0.006 rows=1 loops=1)

  • Index Cond: (id = customers_customer.site_id)
24. 0.006 0.006 ↑ 3.9 8 1

Seq Scan on essays_product_type (cost=0.00..1.31 rows=31 width=637) (actual time=0.005..0.006 rows=8 loops=1)

25. 0.004 0.004 ↓ 0.0 0 1

Index Scan using essays_order_available_pkey on essays_order_available (cost=0.28..8.29 rows=1 width=42) (actual time=0.004..0.004 rows=0 loops=1)

  • Index Cond: (order_id = 11,840)
26. 0.005 0.005 ↑ 1.0 1 1

Index Scan using refunds_orders_relation_pkey on refunds_orders_relation (cost=0.28..8.29 rows=1 width=50) (actual time=0.004..0.005 rows=1 loops=1)

  • Index Cond: (order_id = 11,840)
27. 0.020 0.020 ↓ 0.0 0 1

Seq Scan on discounts_discount_order_relation (cost=0.00..4.62 rows=1 width=34) (actual time=0.020..0.020 rows=0 loops=1)

  • Filter: (order_id = 11,840)
  • Rows Removed by Filter: 210
Planning time : 6.336 ms
Execution time : 1.173 ms