explain.depesz.com

PostgreSQL's explain analyze made readable

Result: dGI5

Settings
# exclusive inclusive rows x rows loops node
1. 0.026 2,758.854 ↓ 2.5 25 1

Limit (cost=7,128.64..7,128.67 rows=10 width=687) (actual time=2,758.819..2,758.854 rows=25 loops=1)

2. 30.486 2,758.828 ↓ 2.5 25 1

Sort (cost=7,128.64..7,128.67 rows=10 width=687) (actual time=2,758.817..2,758.828 rows=25 loops=1)

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

Nested Loop (cost=6,651.14..7,128.48 rows=10 width=687) (actual time=990.493..2,728.342 rows=14,135 loops=1)

4. 1,379.896 2,683.855 ↓ 1,413.5 14,135 1

Nested Loop (cost=6,650.86..7,125.45 rows=10 width=632) (actual time=990.437..2,683.855 rows=14,135 loops=1)

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

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

6. 376.127 1,303.244 ↓ 1,413.5 14,135 172

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

7. 19.075 927.117 ↓ 1,413.5 14,135 1

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

8. 9.512 865.637 ↓ 1,413.5 14,135 1

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

9. 3.756 813.720 ↓ 1,413.5 14,135 1

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

10. 29.163 753.424 ↓ 1,413.5 14,135 1

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

11. 8.876 597.046 ↓ 706.8 14,135 1

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

12. 23.336 422.917 ↓ 556.4 15,023 1

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

  • Group Key: u0.id
13. 3.458 399.581 ↓ 556.4 15,023 1

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

14. 15.947 396.123 ↓ 557.1 15,043 1

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

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

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

16. 0.835 337.005 ↓ 385.4 16,574 1

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

17. 13.899 187.004 ↓ 385.4 16,574 1

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

18. 11.980 73.661 ↓ 385.4 16,574 1

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

  • Hash Cond: (u0.writer_id = u5.id)
19. 20.074 21.677 ↓ 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=1.818..21.677 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.603 1.603 ↑ 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.603..1.603 rows=19,037 loops=1)

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

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

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

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

  • Filter: ((status)::text ~~ 'active:%'::text)
  • Rows Removed by Filter: 49674
23. 99.444 99.444 ↑ 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.006..0.006 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.008..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. 165.253 165.253 ↑ 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.011..0.011 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.201 127.215 ↑ 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.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.014 0.014 ↓ 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.013..0.014 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.003..0.003 rows=1 loops=14,135)

  • Index Cond: (writers_writer.id = writer_id)
32. 42.405 42.405 ↑ 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.003..0.003 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 : 6.984 ms
Execution time : 2,761.582 ms