explain.depesz.com

PostgreSQL's explain analyze made readable

Result: e4U8

Settings
# exclusive inclusive rows x rows loops node
1. 0.031 1,717.014 ↓ 2.5 25 1

Limit (cost=7,128.65..7,128.67 rows=10 width=241) (actual time=1,716.880..1,717.014 rows=25 loops=1)

2. 5.710 1,716.983 ↓ 2.5 25 1

Sort (cost=7,128.65..7,128.67 rows=10 width=241) (actual time=1,716.877..1,716.983 rows=25 loops=1)

  • Sort Key: feedback_customer_feedback.id DESC
  • Sort Method: top-N heapsort Memory: 32kB
3. 0.000 1,711.273 ↓ 1,413.5 14,135 1

Nested Loop (cost=6,651.14..7,128.48 rows=10 width=241) (actual time=1,000.923..1,711.273 rows=14,135 loops=1)

4. 531.116 1,684.014 ↓ 1,413.5 14,135 1

Nested Loop (cost=6,650.86..7,125.45 rows=10 width=217) (actual time=1,000.872..1,684.014 rows=14,135 loops=1)

  • Join Filter: (essays_order.level_work_id = essays_levelwork.id)
  • Rows Removed by Join Filter: 2417085
5. 1.186 1.186 ↓ 1.2 172 1

Seq Scan on essays_levelwork (cost=0.00..3.41 rows=141 width=14) (actual time=0.028..1.186 rows=172 loops=1)

6. 180.964 1,151.712 ↓ 1,413.5 14,135 172

Materialize (cost=6,650.86..7,100.92 rows=10 width=203) (actual time=2.885..6.696 rows=14,135 loops=172)

7. 12.516 970.748 ↓ 1,413.5 14,135 1

Nested Loop (cost=6,650.86..7,100.87 rows=10 width=203) (actual time=496.192..970.748 rows=14,135 loops=1)

8. 2.425 929.962 ↓ 1,413.5 14,135 1

Nested Loop Left Join (cost=6,650.59..7,097.84 rows=10 width=181) (actual time=496.173..929.962 rows=14,135 loops=1)

9. 2.737 885.132 ↓ 1,413.5 14,135 1

Nested Loop Left Join (cost=6,650.31..7,094.78 rows=10 width=113) (actual time=496.154..885.132 rows=14,135 loops=1)

10. 11.387 825.855 ↓ 1,413.5 14,135 1

Nested Loop (cost=6,650.02..7,091.54 rows=10 width=109) (actual time=496.124..825.855 rows=14,135 loops=1)

11. 11.026 658.983 ↓ 706.8 14,135 1

Nested Loop (cost=6,641.29..6,865.29 rows=20 width=79) (actual time=496.046..658.983 rows=14,135 loops=1)

12. 23.843 512.750 ↓ 556.4 15,023 1

HashAggregate (cost=6,640.87..6,641.14 rows=27 width=8) (actual time=495.978..512.750 rows=15,023 loops=1)

  • Group Key: u0.id
13. 2.504 488.907 ↓ 556.4 15,023 1

Unique (cost=6,640.40..6,640.54 rows=27 width=24) (actual time=483.031..488.907 rows=15,023 loops=1)

14. 13.693 486.403 ↓ 557.1 15,043 1

Sort (cost=6,640.40..6,640.47 rows=27 width=24) (actual time=483.027..486.403 rows=15,043 loops=1)

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

Nested Loop (cost=3,947.97..6,639.76 rows=27 width=24) (actual time=54.755..472.710 rows=15,043 loops=1)

16. 12.525 423.481 ↓ 385.4 16,574 1

Nested Loop (cost=3,947.69..6,626.51 rows=43 width=28) (actual time=54.736..423.481 rows=16,574 loops=1)

17. 14.313 245.216 ↓ 385.4 16,574 1

Nested Loop (cost=3,947.27..6,583.07 rows=43 width=28) (actual time=54.713..245.216 rows=16,574 loops=1)

18. 37.958 114.885 ↓ 385.4 16,574 1

Hash Join (cost=3,946.84..6,323.74 rows=43 width=24) (actual time=54.677..114.885 rows=16,574 loops=1)

  • Hash Cond: (u0.writer_id = u5.id)
19. 22.502 27.723 ↓ 2.2 18,969 1

Bitmap Heap Scan on feedback_customer_feedback u0 (cost=377.68..2,721.48 rows=8,711 width=28) (actual time=5.446..27.723 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=1745
20. 5.221 5.221 ↑ 1.1 19,037 1

Bitmap Index Scan on feedback_is_shareable__idx (cost=0.00..375.50 rows=20,144 width=0) (actual time=5.221..5.221 rows=19,037 loops=1)

  • Index Cond: (is_shareable = true)
21. 0.372 49.204 ↓ 5.7 1,450 1

Hash (cost=3,566.01..3,566.01 rows=253 width=4) (actual time=49.204..49.204 rows=1,450 loops=1)

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

Seq Scan on writers_writer u5 (cost=0.00..3,566.01 rows=253 width=4) (actual time=0.082..48.832 rows=1,450 loops=1)

  • Filter: ((status)::text ~~ 'active:%'::text)
  • Rows Removed by Filter: 49674
23. 116.018 116.018 ↑ 1.0 1 16,574

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

  • Index Cond: (id = u0.order_id)
24. 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=8) (actual time=0.010..0.010 rows=1 loops=16,574)

  • Index Cond: (id = u1.customer_id)
25. 33.148 33.148 ↑ 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.002..0.002 rows=1 loops=16,574)

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

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

  • Index Cond: (id = u0.id)
  • Filter: ((paper_rating > 8) AND (paper_rating <= 10))
  • Rows Removed by Filter: 0
27. 155.468 155.485 ↑ 1.0 1 14,135

Index Scan using essays_order_pkey on essays_order (cost=8.73..11.30 rows=1 width=30) (actual time=0.010..0.011 rows=1 loops=14,135)

  • Index Cond: (id = feedback_customer_feedback.order_id)
  • Filter: (NOT (hashed SubPlan 1))
28.          

SubPlan (forIndex Scan)

29. 0.017 0.017 ↓ 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.017..0.017 rows=0 loops=1)

  • Index Cond: (customer_id = 617936)
  • Filter: is_active
30. 56.540 56.540 ↑ 1.0 1 14,135

Index Only Scan using writers_writer_pkey on writers_writer (cost=0.29..0.31 rows=1 width=4) (actual time=0.003..0.004 rows=1 loops=14,135)

  • Index Cond: (id = feedback_customer_feedback.writer_id)
  • Heap Fetches: 12
31. 42.405 42.405 ↑ 1.0 1 14,135

Index Scan using writers_widget_stats_view_writer_id_uniq on writers_widget_stats_view (cost=0.28..0.30 rows=1 width=76) (actual time=0.002..0.003 rows=1 loops=14,135)

  • Index Cond: (writers_writer.id = writer_id)
32. 28.270 28.270 ↑ 1.0 1 14,135

Index Scan using essays_papersubject_pkey on essays_papersubject (cost=0.28..0.29 rows=1 width=22) (actual time=0.002..0.002 rows=1 loops=14,135)

  • Index Cond: (id = essays_order.paper_subject_id)
33. 28.270 28.270 ↑ 1.0 1 14,135

Index Scan using essays_typeofwork_pkey on essays_typeofwork (cost=0.28..0.29 rows=1 width=24) (actual time=0.001..0.002 rows=1 loops=14,135)

  • Index Cond: (id = essays_order.type_of_work_id)
Planning time : 6.235 ms
Execution time : 1,718.570 ms