explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FawS

Settings
# exclusive inclusive rows x rows loops node
1. 0.013 715.091 ↓ 25.0 25 1

Limit (cost=6,969.76..6,969.77 rows=1 width=689) (actual time=715.063..715.091 rows=25 loops=1)

2. 0.013 715.078 ↓ 25.0 25 1

Unique (cost=6,969.76..6,969.77 rows=1 width=689) (actual time=715.060..715.078 rows=25 loops=1)

3. 6.741 715.065 ↓ 25.0 25 1

Sort (cost=6,969.76..6,969.77 rows=1 width=689) (actual time=715.051..715.065 rows=25 loops=1)

  • Sort Key: feedback_customer_feedback.order_id, feedback_customer_feedback.approve_date DESC
  • Sort Method: quicksort Memory: 837kB
4. 56.819 708.324 ↓ 800.0 800 1

Nested Loop (cost=3,957.53..6,969.75 rows=1 width=689) (actual time=55.566..708.324 rows=800 loops=1)

  • Join Filter: (essays_order.type_of_work_id = essays_typeofwork.id)
  • Rows Removed by Join Filter: 453600
5. 3.231 589.905 ↓ 800.0 800 1

Nested Loop (cost=3,957.53..6,948.98 rows=1 width=632) (actual time=55.542..589.905 rows=800 loops=1)

6. 1.779 567.474 ↓ 800.0 800 1

Nested Loop (cost=3,957.53..6,945.21 rows=1 width=595) (actual time=55.517..567.474 rows=800 loops=1)

7. 194.682 560.895 ↓ 800.0 800 1

Nested Loop Left Join (cost=3,957.25..6,936.91 rows=1 width=553) (actual time=55.499..560.895 rows=800 loops=1)

  • Join Filter: (writers_writer.id = writers_widget_stats_view.writer_id)
  • Rows Removed by Join Filter: 1159200
8. 1.039 251.013 ↓ 800.0 800 1

Nested Loop (cost=3,957.25..6,894.28 rows=1 width=485) (actual time=55.221..251.013 rows=800 loops=1)

9. 1.555 243.574 ↓ 800.0 800 1

Nested Loop (cost=3,956.97..6,893.97 rows=1 width=489) (actual time=55.201..243.574 rows=800 loops=1)

10. 13.268 225.219 ↓ 800.0 800 1

Nested Loop (cost=3,956.55..6,888.84 rows=1 width=485) (actual time=55.177..225.219 rows=800 loops=1)

11. 20.524 103.192 ↓ 485.5 15,537 1

Hash Join (cost=3,947.82..6,415.61 rows=32 width=111) (actual time=54.550..103.192 rows=15,537 loops=1)

  • Hash Cond: (feedback_customer_feedback.writer_id = writers_writer.id)
12. 28.421 30.292 ↓ 2.8 17,755 1

Bitmap Heap Scan on feedback_customer_feedback (cost=377.03..2,820.38 rows=6,433 width=107) (actual time=2.138..30.292 rows=17,755 loops=1)

  • Filter: ((NOT is_deleted) AND is_approved AND is_shareable AND ((comment)::text <> ''::text) AND (paper_rating > 8) AND (paper_rating <= 10))
  • Rows Removed by Filter: 1281
  • Heap Blocks: exact=1744
13. 1.871 1.871 ↑ 1.1 19,036 1

Bitmap Index Scan on feedback_is_shareable__idx (cost=0.00..375.42 rows=20,134 width=0) (actual time=1.871..1.871 rows=19,036 loops=1)

  • Index Cond: (is_shareable = true)
14. 0.560 52.376 ↓ 5.7 1,450 1

Hash (cost=3,567.62..3,567.62 rows=254 width=4) (actual time=52.376..52.376 rows=1,450 loops=1)

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

Seq Scan on writers_writer (cost=0.00..3,567.62 rows=254 width=4) (actual time=0.085..51.816 rows=1,450 loops=1)

  • Filter: ((status)::text ~~ 'active:%'::text)
  • Rows Removed by Filter: 49674
16. 108.746 108.759 ↓ 0.0 0 15,537

Index Scan using essays_order_pkey on essays_order (cost=8.73..14.78 rows=1 width=374) (actual time=0.007..0.007 rows=0 loops=15,537)

  • 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
17.          

SubPlan (forIndex Scan)

18. 0.013 0.013 ↓ 0.0 0 1

Index Scan using customers_writer_blacklist_customer_id_idx on customers_writer_blacklist u0 (cost=0.28..8.30 rows=1 width=4) (actual time=0.013..0.013 rows=0 loops=1)

  • Index Cond: (customer_id = 617936)
  • Filter: is_active
19. 16.800 16.800 ↑ 1.0 1 800

Index Scan using customers_customer_pkey on customers_customer (cost=0.42..5.13 rows=1 width=8) (actual time=0.020..0.021 rows=1 loops=800)

  • Index Cond: (id = essays_order.customer_id)
20. 6.400 6.400 ↑ 1.0 1 800

Index Scan using core_site_pkey on core_site (cost=0.28..0.30 rows=1 width=4) (actual time=0.007..0.008 rows=1 loops=800)

  • Index Cond: (id = customers_customer.site_id)
  • Filter: (region_id = 2)
21. 115.200 115.200 ↑ 1.0 1,450 800

Seq Scan on writers_widget_stats_view (cost=0.00..24.50 rows=1,450 width=76) (actual time=0.006..0.144 rows=1,450 loops=800)

22. 4.800 4.800 ↑ 1.0 1 800

Index Scan using essays_papersubject_pkey on essays_papersubject (cost=0.28..8.29 rows=1 width=42) (actual time=0.005..0.006 rows=1 loops=800)

  • Index Cond: (id = 359)
23. 19.200 19.200 ↑ 1.0 1 800

Seq Scan on essays_levelwork (cost=0.00..3.76 rows=1 width=37) (actual time=0.009..0.024 rows=1 loops=800)

  • Filter: (id = 2)
  • Rows Removed by Filter: 171
24. 61.600 61.600 ↑ 1.1 568 800

Seq Scan on essays_typeofwork (cost=0.00..13.12 rows=612 width=51) (actual time=0.004..0.077 rows=568 loops=800)

Planning time : 29.423 ms
Execution time : 715.980 ms