explain.depesz.com

PostgreSQL's explain analyze made readable

Result: chuV

Settings
# exclusive inclusive rows x rows loops node
1. 0.018 1,722.760 ↓ 2.5 25 1

Limit (cost=7,128.64..7,128.67 rows=10 width=241) (actual time=1,722.721..1,722.760 rows=25 loops=1)

2. 8.807 1,722.742 ↓ 2.5 25 1

Sort (cost=7,128.64..7,128.67 rows=10 width=241) (actual time=1,722.718..1,722.742 rows=25 loops=1)

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

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

4. 574.492 1,677.029 ↓ 1,413.5 14,135 1

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

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

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

6. 190.411 1,101.832 ↓ 1,413.5 14,135 172

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

7. 8.760 911.421 ↓ 1,413.5 14,135 1

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

8. 13.049 874.391 ↓ 1,413.5 14,135 1

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

9. 6.462 833.072 ↓ 1,413.5 14,135 1

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

10. 17.463 784.205 ↓ 1,413.5 14,135 1

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

11. 13.896 639.527 ↓ 706.8 14,135 1

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

12. 19.633 505.447 ↓ 556.4 15,023 1

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

  • Group Key: u0.id
13. 2.560 485.814 ↓ 556.4 15,023 1

Unique (cost=6,640.40..6,640.53 rows=27 width=24) (actual time=480.093..485.814 rows=15,023 loops=1)

14. 12.830 483.254 ↓ 557.1 15,043 1

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

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

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

16. 15.693 417.294 ↓ 385.4 16,574 1

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

17. 16.481 252.435 ↓ 385.4 16,574 1

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

18. 12.588 103.362 ↓ 385.4 16,574 1

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

  • Hash Cond: (u0.writer_id = u5.id)
19. 33.227 35.331 ↓ 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=2.397..35.331 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. 2.104 2.104 ↑ 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=2.104..2.104 rows=19,037 loops=1)

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

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

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

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

  • Filter: ((status)::text ~~ 'active:%'::text)
  • Rows Removed by Filter: 49674
23. 132.592 132.592 ↑ 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.008..0.008 rows=1 loops=16,574)

  • Index Cond: (id = u0.order_id)
24. 149.166 149.166 ↑ 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.009..0.009 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. 120.184 120.184 ↑ 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.008..0.008 rows=1 loops=15,023)

  • Index Cond: (id = u0.id)
  • Filter: ((paper_rating > 8) AND (paper_rating <= 10))
  • Rows Removed by Filter: 0
27. 127.197 127.215 ↑ 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.009..0.009 rows=1 loops=14,135)

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

SubPlan (forIndex Scan)

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

  • Index Cond: (customer_id = 617936)
  • Filter: is_active
30. 42.405 42.405 ↑ 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.003 rows=1 loops=14,135)

  • Index Cond: (id = feedback_customer_feedback.writer_id)
  • Heap Fetches: 12
31. 28.270 28.270 ↑ 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.002 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.002..0.002 rows=1 loops=14,135)

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