explain.depesz.com

PostgreSQL's explain analyze made readable

Result: H4OG

Settings
# exclusive inclusive rows x rows loops node
1. 0.072 1,594.201 ↑ 1.0 1 1

Aggregate (cost=7,120.45..7,120.46 rows=1 width=8) (actual time=1,594.201..1,594.201 rows=1 loops=1)

2. 0.190 1,594.129 ↓ 795.0 795 1

Group (cost=7,120.42..7,120.44 rows=1 width=84) (actual time=1,593.749..1,594.129 rows=795 loops=1)

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

Sort (cost=7,120.42..7,120.42 rows=1 width=84) (actual time=1,593.746..1,593.939 rows=795 loops=1)

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

Nested Loop Left Join (cost=6,648.77..7,120.41 rows=1 width=84) (actual time=605.212..1,592.386 rows=795 loops=1)

5. 1.917 1,154.341 ↓ 795.0 795 1

Nested Loop (cost=6,648.44..7,090.12 rows=1 width=16) (actual time=604.891..1,154.341 rows=795 loops=1)

6. 9.253 897.994 ↓ 706.8 14,135 1

Nested Loop (cost=6,639.71..6,863.71 rows=20 width=20) (actual time=604.393..897.994 rows=14,135 loops=1)

7. 35.007 633.350 ↓ 556.4 15,023 1

HashAggregate (cost=6,639.29..6,639.56 rows=27 width=8) (actual time=604.343..633.350 rows=15,023 loops=1)

  • Group Key: u0.id
8. 2.412 598.343 ↓ 556.4 15,023 1

Unique (cost=6,638.82..6,638.96 rows=27 width=24) (actual time=592.956..598.343 rows=15,023 loops=1)

9. 12.194 595.931 ↓ 557.1 15,043 1

Sort (cost=6,638.82..6,638.89 rows=27 width=24) (actual time=592.954..595.931 rows=15,043 loops=1)

  • Sort Key: u0.order_id, u0.approve_date DESC
  • Sort Method: quicksort Memory: 1560kB
10. 14.498 583.737 ↓ 557.1 15,043 1

Nested Loop (cost=3,952.82..6,638.18 rows=27 width=24) (actual time=62.273..583.737 rows=15,043 loops=1)

11. 12.557 486.369 ↓ 385.4 16,574 1

Nested Loop (cost=3,952.54..6,624.94 rows=43 width=28) (actual time=62.257..486.369 rows=16,574 loops=1)

12. 30.229 308.072 ↓ 385.4 16,574 1

Nested Loop (cost=3,952.12..6,581.30 rows=43 width=28) (actual time=62.235..308.072 rows=16,574 loops=1)

13. 13.292 145.251 ↓ 385.4 16,574 1

Hash Join (cost=3,951.69..6,321.77 rows=43 width=24) (actual time=62.200..145.251 rows=16,574 loops=1)

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

Bitmap Heap Scan on feedback_customer_feedback u0 (cost=377.23..2,714.31 rows=8,686 width=28) (actual time=1.862..71.653 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=1744
15. 1.643 1.643 ↑ 1.1 19,036 1

Bitmap Index Scan on feedback_is_shareable__idx (cost=0.00..375.06 rows=20,086 width=0) (actual time=1.643..1.643 rows=19,036 loops=1)

  • Index Cond: (is_shareable = true)
16. 0.445 60.306 ↓ 5.7 1,450 1

Hash (cost=3,571.27..3,571.27 rows=255 width=4) (actual time=60.306..60.306 rows=1,450 loops=1)

  • Buckets: 2048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 67kB
17. 59.861 59.861 ↓ 5.7 1,450 1

Seq Scan on writers_writer u6 (cost=0.00..3,571.27 rows=255 width=4) (actual time=0.071..59.861 rows=1,450 loops=1)

  • Filter: ((status)::text ~~ 'active:%'::text)
  • Rows Removed by Filter: 49671
18. 132.592 132.592 ↑ 1.0 1 16,574

Index Scan using essays_order_pkey on essays_order u1 (cost=0.43..6.03 rows=1 width=12) (actual time=0.008..0.008 rows=1 loops=16,574)

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

Index Scan using customers_customer_pkey on customers_customer u2 (cost=0.42..1.00 rows=1 width=12) (actual time=0.010..0.010 rows=1 loops=16,574)

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

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,574)

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

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

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

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

  • 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 (forIndex Scan)

24. 0.012 0.012 ↓ 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.012..0.012 rows=0 loops=1)

  • Index Cond: (customer_id = 617936)
  • Filter: is_active
25. 236.910 411.810 ↑ 1.0 1 795

Hash Right Join (cost=0.33..30.27 rows=1 width=76) (actual time=0.385..0.518 rows=1 loops=795)

  • Hash Cond: (writers_widget_stats_view.writer_id = writers_writer.id)
26. 166.155 166.155 ↑ 1.0 1,450 795

Seq Scan on writers_widget_stats_view (cost=0.00..24.50 rows=1,450 width=76) (actual time=0.005..0.209 rows=1,450 loops=795)

27. 1.590 8.745 ↑ 1.0 1 795

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
28. 7.155 7.155 ↑ 1.0 1 795

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

  • Index Cond: (id = feedback_customer_feedback.writer_id)
  • Heap Fetches: 0
Planning time : 5.854 ms
Execution time : 1,594.677 ms