explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 0IHs

Settings
# exclusive inclusive rows x rows loops node
1. 0.008 711.582 ↓ 25.0 25 1

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

2. 0.012 711.574 ↓ 25.0 25 1

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

3. 5.831 711.562 ↓ 25.0 25 1

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

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

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

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

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

6. 1.770 555.580 ↓ 800.0 800 1

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

7. 137.717 540.210 ↓ 800.0 800 1

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

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

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

9. 0.976 267.016 ↓ 800.0 800 1

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

10. 8.245 253.240 ↓ 800.0 800 1

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

11. 16.909 120.699 ↓ 485.5 15,537 1

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

  • Hash Cond: (feedback_customer_feedback.writer_id = writers_writer.id)
12. 57.563 59.531 ↓ 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.242..59.531 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.968 1.968 ↑ 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.968..1.968 rows=19,036 loops=1)

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

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

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

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

  • Filter: ((status)::text ~~ 'active:%'::text)
  • Rows Removed by Filter: 49674
16. 124.282 124.296 ↓ 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.008..0.008 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.014 0.014 ↓ 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.014..0.014 rows=0 loops=1)

  • Index Cond: (customer_id = 617936)
  • Filter: is_active
19. 12.800 12.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.015..0.016 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. 128.000 128.000 ↑ 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.160 rows=1,450 loops=800)

22. 13.600 13.600 ↑ 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.016..0.017 rows=1 loops=800)

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

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

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

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

Planning time : 6.583 ms
Execution time : 712.186 ms