explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2Ss7

Settings
# exclusive inclusive rows x rows loops node
1. 0.027 3,199.311 ↓ 2.5 25 1

Limit (cost=7,128.64..7,128.67 rows=10 width=687) (actual time=3,199.271..3,199.311 rows=25 loops=1)

2. 28.907 3,199.284 ↓ 2.5 25 1

Sort (cost=7,128.64..7,128.67 rows=10 width=687) (actual time=3,199.268..3,199.284 rows=25 loops=1)

  • Sort Key: feedback_customer_feedback.id DESC
  • Sort Method: top-N heapsort Memory: 50kB
3. 8.319 3,170.377 ↓ 1,413.5 14,135 1

Nested Loop (cost=6,651.14..7,128.48 rows=10 width=687) (actual time=1,128.255..3,170.377 rows=14,135 loops=1)

4. 1,633.421 3,133.788 ↓ 1,413.5 14,135 1

Nested Loop (cost=6,650.86..7,125.45 rows=10 width=632) (actual time=1,128.211..3,133.788 rows=14,135 loops=1)

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

Seq Scan on essays_levelwork (cost=0.00..3.41 rows=141 width=37) (actual time=0.024..0.871 rows=172 loops=1)

6. 445.888 1,499.496 ↓ 1,413.5 14,135 172

Materialize (cost=6,650.86..7,100.92 rows=10 width=595) (actual time=3.273..8.718 rows=14,135 loops=172)

7. 10.303 1,053.608 ↓ 1,413.5 14,135 1

Nested Loop (cost=6,650.86..7,100.87 rows=10 width=595) (actual time=562.913..1,053.608 rows=14,135 loops=1)

8. 12.948 1,015.035 ↓ 1,413.5 14,135 1

Nested Loop Left Join (cost=6,650.59..7,097.84 rows=10 width=553) (actual time=562.892..1,015.035 rows=14,135 loops=1)

9. 17.035 959.682 ↓ 1,413.5 14,135 1

Nested Loop Left Join (cost=6,650.31..7,094.78 rows=10 width=485) (actual time=562.873..959.682 rows=14,135 loops=1)

10. 16.348 900.242 ↓ 1,413.5 14,135 1

Nested Loop (cost=6,650.02..7,091.54 rows=10 width=481) (actual time=562.843..900.242 rows=14,135 loops=1)

11. 4.061 714.274 ↓ 706.8 14,135 1

Nested Loop (cost=6,641.29..6,865.29 rows=20 width=107) (actual time=562.759..714.274 rows=14,135 loops=1)

12. 21.906 575.006 ↓ 556.4 15,023 1

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

  • Group Key: u0.id
13. 2.362 553.100 ↓ 556.4 15,023 1

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

14. 35.816 550.738 ↓ 557.1 15,043 1

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

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

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

16. 15.384 469.910 ↓ 385.4 16,574 1

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

17. 9.530 222.490 ↓ 385.4 16,574 1

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

18. 23.113 80.368 ↓ 385.4 16,574 1

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

  • Hash Cond: (u0.writer_id = u6.id)
19. 23.199 24.978 ↓ 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.030..24.978 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. 1.779 1.779 ↑ 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=1.778..1.779 rows=19,037 loops=1)

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

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

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

Seq Scan on writers_writer u6 (cost=0.00..3,566.01 rows=253 width=4) (actual time=0.085..31.900 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. 232.036 232.036 ↑ 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.014..0.014 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=107) (actual time=0.008..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. 169.605 169.620 ↑ 1.0 1 14,135

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

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

SubPlan (forIndex Scan)

29. 0.015 0.015 ↓ 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.015..0.015 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: 0
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.003..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=42) (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=51) (actual time=0.002..0.002 rows=1 loops=14,135)

  • Index Cond: (id = essays_order.type_of_work_id)
Planning time : 7.876 ms
Execution time : 3,201.541 ms