explain.depesz.com

PostgreSQL's explain analyze made readable

Result: d0PO

Settings
# exclusive inclusive rows x rows loops node
1. 0.056 1,436.144 ↑ 1.0 1 1

Aggregate (cost=10,206.10..10,206.11 rows=1 width=8) (actual time=1,436.144..1,436.144 rows=1 loops=1)

2. 0.214 1,436.088 ↓ 795.0 795 1

Group (cost=10,206.07..10,206.08 rows=1 width=84) (actual time=1,435.738..1,436.088 rows=795 loops=1)

  • Group Key: feedback_customer_feedback.id, writers_widget_stats_view.price_per_page, writers_widget_stats_view.completed_orders, writers_widget_stats_view.satisfaction_rate, (COALESCE(feedback_customer_feedback.writer_id, essays_order.writer_id))
3. 1.468 1,435.874 ↓ 795.0 795 1

Sort (cost=10,206.07..10,206.07 rows=1 width=84) (actual time=1,435.736..1,435.874 rows=795 loops=1)

  • Sort Key: feedback_customer_feedback.id, writers_widget_stats_view.price_per_page, writers_widget_stats_view.completed_orders, writers_widget_stats_view.satisfaction_rate, (COALESCE(feedback_customer_feedback.writer_id, essays_order.writer_id))
  • Sort Method: quicksort Memory: 87kB
4. 5.693 1,434.406 ↓ 795.0 795 1

Nested Loop Left Join (cost=9,743.54..10,206.06 rows=1 width=84) (actual time=782.205..1,434.406 rows=795 loops=1)

5. 0.680 1,142.513 ↓ 795.0 795 1

Nested Loop (cost=9,743.20..10,184.98 rows=1 width=16) (actual time=781.773..1,142.513 rows=795 loops=1)

6. 26.127 972.117 ↓ 707.1 14,143 1

Nested Loop (cost=9,734.47..9,958.48 rows=20 width=20) (actual time=781.322..972.117 rows=14,143 loops=1)

7. 19.909 795.680 ↓ 556.7 15,031 1

HashAggregate (cost=9,734.06..9,734.33 rows=27 width=8) (actual time=781.252..795.680 rows=15,031 loops=1)

  • Group Key: u0.id
8. 10.084 775.771 ↓ 556.7 15,031 1

Unique (cost=9,733.58..9,733.72 rows=27 width=24) (actual time=763.374..775.771 rows=15,031 loops=1)

9. 14.147 765.687 ↓ 557.4 15,051 1

Sort (cost=9,733.58..9,733.65 rows=27 width=24) (actual time=763.371..765.687 rows=15,051 loops=1)

  • Sort Key: u0.order_id, u0.approve_date DESC
  • Sort Method: quicksort Memory: 1,560kB
10. 13.312 751.540 ↓ 557.4 15,051 1

Nested Loop (cost=7,063.64..9,732.94 rows=27 width=24) (actual time=65.381..751.540 rows=15,051 loops=1)

11. 16.281 655.318 ↓ 385.6 16,582 1

Nested Loop (cost=7,063.37..9,719.70 rows=43 width=28) (actual time=65.356..655.318 rows=16,582 loops=1)

12. 46.344 373.725 ↓ 385.6 16,582 1

Nested Loop (cost=7,062.94..9,675.56 rows=43 width=28) (actual time=65.292..373.725 rows=16,582 loops=1)

13. 19.866 111.815 ↓ 385.6 16,582 1

Hash Join (cost=7,062.52..9,415.56 rows=43 width=24) (actual time=65.225..111.815 rows=16,582 loops=1)

  • Hash Cond: (u0.writer_id = u6.id)
14. 27.015 29.159 ↓ 2.2 18,969 1

Bitmap Heap Scan on feedback_customer_feedback u0 (cost=372.14..2,692.41 rows=8,624 width=28) (actual time=2.410..29.159 rows=18,969 loops=1)

  • Filter: ((NOT is_deleted) AND is_approved AND is_shareable AND ((comment)::text <> ''::text))
  • Rows Removed by Filter: 67
  • Heap Blocks: exact=1,744
15. 2.144 2.144 ↑ 1.0 19,036 1

Bitmap Index Scan on feedback_is_shareable__idx (cost=0.00..369.98 rows=19,942 width=0) (actual time=2.144..2.144 rows=19,036 loops=1)

  • Index Cond: (is_shareable = true)
16. 0.519 62.790 ↓ 3.4 1,453 1

Hash (cost=6,684.99..6,684.99 rows=431 width=4) (actual time=62.790..62.790 rows=1,453 loops=1)

  • Buckets: 2,048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 68kB
17. 62.271 62.271 ↓ 3.4 1,453 1

Seq Scan on writers_writer u6 (cost=0.00..6,684.99 rows=431 width=4) (actual time=0.284..62.271 rows=1,453 loops=1)

  • Filter: ((status)::text ~~ 'active:%'::text)
  • Rows Removed by Filter: 49,665
18. 215.566 215.566 ↑ 1.0 1 16,582

Index Scan using essays_order_pkey on essays_order u1 (cost=0.43..6.04 rows=1 width=12) (actual time=0.013..0.013 rows=1 loops=16,582)

  • Index Cond: (id = u0.order_id)
19. 265.312 265.312 ↑ 1.0 1 16,582

Index Scan using customers_customer_pkey on customers_customer u2 (cost=0.42..1.02 rows=1 width=12) (actual time=0.016..0.016 rows=1 loops=16,582)

  • Index Cond: (id = u1.customer_id)
20. 82.910 82.910 ↑ 1.0 1 16,582

Index Scan using core_site_pkey on core_site u3 (cost=0.28..0.30 rows=1 width=4) (actual time=0.005..0.005 rows=1 loops=16,582)

  • Index Cond: (id = u2.site_id)
  • Filter: (region_id = 2)
  • Rows Removed by Filter: 0
21. 150.310 150.310 ↑ 1.0 1 15,031

Index Scan using feedback_customer_feedback_pkey on feedback_customer_feedback (cost=0.42..8.29 rows=1 width=20) (actual time=0.010..0.010 rows=1 loops=15,031)

  • Index Cond: (id = u0.id)
  • Filter: ((paper_rating > 8) AND (paper_rating <= 10))
  • Rows Removed by Filter: 0
22. 169.707 169.716 ↓ 0.0 0 14,143

Index Scan using essays_order_pkey on essays_order (cost=8.73..11.31 rows=1 width=12) (actual time=0.012..0.012 rows=0 loops=14,143)

  • Index Cond: (id = feedback_customer_feedback.order_id)
  • Filter: ((paper_subject_id = 359) AND (level_work_id = 2) AND (NOT (hashed SubPlan 1)))
  • Rows Removed by Filter: 1
23.          

SubPlan (for Index Scan)

24. 0.009 0.009 ↓ 0.0 0 1

Index Scan using customers_writer_blacklist_customer_id_idx on customers_writer_blacklist u0_1 (cost=0.28..8.30 rows=1 width=4) (actual time=0.009..0.009 rows=0 loops=1)

  • Index Cond: (customer_id = 617,936)
  • Filter: is_active
25. 147.870 286.200 ↑ 1.0 1 795

Hash Right Join (cost=0.34..21.07 rows=1 width=76) (actual time=0.237..0.360 rows=1 loops=795)

  • Hash Cond: (writers_widget_stats_view.writer_id = writers_writer.id)
26. 129.585 129.585 ↓ 1.9 1,453 795

Seq Scan on writers_widget_stats_view (cost=0.00..17.80 rows=780 width=76) (actual time=0.005..0.163 rows=1,453 loops=795)

27. 0.795 8.745 ↑ 1.0 1 795

Hash (cost=0.32..0.32 rows=1 width=4) (actual time=0.011..0.011 rows=1 loops=795)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
28. 7.950 7.950 ↑ 1.0 1 795

Index Only Scan using writers_writer_pkey on writers_writer (cost=0.29..0.32 rows=1 width=4) (actual time=0.010..0.010 rows=1 loops=795)

  • Index Cond: (id = feedback_customer_feedback.writer_id)
  • Heap Fetches: 10
Planning time : 14.424 ms
Execution time : 1,437.168 ms