explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1JGN

Settings
# exclusive inclusive rows x rows loops node
1. 0.059 1,537.727 ↑ 1.0 1 1

Execution time: 1538.008 msAggregate (cost=9,978.13..9,978.14 rows=1 width=8) (actual time=1,537.726..1,537.727 rows=1 loops=1)

2. 0.175 1,537.668 ↓ 795.0 795 1

Group (cost=9,978.10..9,978.12 rows=1 width=84) (actual time=1,537.396..1,537.668 rows=795 loops=1)

  • Group Key: feedback_customer_feedback.id, writers_widget_stats_view.price_per_page, writers_widget_stats_view.completed_orders, writers_widget_stats_view.satisfaction_rate, (COALESCE(feedback_customer_feedback.writer_id, essays_order.writer_id))
3. 1.411 1,537.493 ↓ 795.0 795 1

Sort (cost=9,978.10..9,978.10 rows=1 width=84) (actual time=1,537.395..1,537.493 rows=795 loops=1)

  • Sort Method: quicksort Memory: 87kB
  • Sort Key: feedback_customer_feedback.id, writers_widget_stats_view.price_per_page, writers_widget_stats_view.completed_orders, writers_widget_stats_view.satisfaction_rate, (COALESCE(feedback_customer_feedback.writer_id, essays_order.writer_id))
4. 6.132 1,536.082 ↓ 795.0 795 1

Nested Loop Left Join (cost=9,515.50..9,978.09 rows=1 width=84) (actual time=717.947..1,536.082 rows=795 loops=1)

5. 1,157.890 1,157.890 ↓ 795.0 795 1

Nested Loop (cost=9,515.16..9,957.01 rows=1 width=16) (actual time=717.706..1,157.890 rows=795 loops=1)

6. 0.000 372.060 ↑ 1.0 1 795

Hash Right Join (cost=0.34..21.07 rows=1 width=76) (actual time=0.346..0.468 rows=1 loops=795)

  • Hash Cond: (writers_widget_stats_view.writer_id = writers_writer.id)
7. 157.410 157.410 ↓ 1.9 1,459 795

Seq Scan on writers_widget_stats_view (cost=0.00..17.80 rows=780 width=76) (actual time=0.005..0.198 rows=1,459 loops=795)

8. 954.472 954.472 ↓ 707.1 14,143 1

Nested Loop (cost=9,506.43..9,730.43 rows=20 width=20) (actual time=717.384..954.472 rows=14,143 loops=1)

9. 198.002 198.002 ↓ 0.0 0 14,143

Index Scan using essays_order_pkey on essays_order (cost=8.73..11.32 rows=1 width=12) (actual time=0.014..0.014 rows=0 loops=14,143)

10. 0.000 7.950 ↑ 1.0 1 795

Hash (cost=0.32..0.32 rows=1 width=4) (actual time=0.010..0.010 rows=1 loops=795)

  • Rows Removed by Filter: 1
  • Index Cond: (id = feedback_customer_feedback.order_id)
  • Filter: ((paper_subject_id = 359) AND (level_work_id = 2) AND (NOT (hashed SubPlan 1)))
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
11. 195.403 195.403 ↑ 1.0 1 15,031

Index Scan using feedback_customer_feedback_pkey on feedback_customer_feedback (cost=0.42..8.29 rows=1 width=20) (actual time=0.013..0.013 rows=1 loops=15,031)

12. 7.155 7.155 ↑ 1.0 1 795

Index Only Scan using writers_writer_pkey on writers_writer (cost=0.29..0.32 rows=1 width=4) (actual time=0.008..0.009 rows=1 loops=795)

13. 747.465 747.473 ↓ 556.7 15,031 1

HashAggregate (cost=9,506.01..9,506.28 rows=27 width=8) (actual time=717.352..747.473 rows=15,031 loops=1)

14. 0.000 0.008 ↓ 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.008..0.008 rows=0 loops=1)

  • Rows Removed by Filter: 0
  • Index Cond: (id = u0.id)
  • Index Cond: (id = feedback_customer_feedback.writer_id)
  • Heap Fetches: 11
  • Group Key: u0.id
  • Filter: ((paper_rating > 8) AND (paper_rating <= 10))
15. 10.333 702.509 ↓ 556.7 15,031 1

Unique (cost=9,505.54..9,505.68 rows=27 width=24) (actual time=689.381..702.509 rows=15,031 loops=1)

  • Index Cond: (customer_id = 617,936)
  • Filter: is_active
16. 21.400 692.176 ↓ 557.4 15,051 1

Sort (cost=9,505.54..9,505.61 rows=27 width=24) (actual time=689.379..692.176 rows=15,051 loops=1)

  • Sort Method: quicksort Memory: 1,560kB
  • Sort Key: u0.order_id, u0.approve_date DESC
17. 4.745 670.776 ↓ 557.4 15,051 1

Nested Loop (cost=6,845.52..9,504.90 rows=27 width=24) (actual time=66.846..670.776 rows=15,051 loops=1)

18. 566.539 566.539 ↓ 385.6 16,582 1

Nested Loop (cost=6,845.24..9,491.65 rows=43 width=28) (actual time=66.830..566.539 rows=16,582 loops=1)

19. 0.000 99.492 ↑ 1.0 1 16,582

Index Scan using core_site_pkey on core_site u3 (cost=0.28..0.30 rows=1 width=4) (actual time=0.005..0.006 rows=1 loops=16,582)

  • Rows Removed by Filter: 0
  • Index Cond: (id = u2.site_id)
  • Filter: (region_id = 2)
20. 335.624 335.624 ↓ 385.6 16,582 1

Nested Loop (cost=6,844.82..9,447.51 rows=43 width=28) (actual time=66.812..335.624 rows=16,582 loops=1)

21. 0.000 215.566 ↑ 1.0 1 16,582

Index Scan using customers_customer_pkey on customers_customer u2 (cost=0.42..1.02 rows=1 width=12) (actual time=0.013..0.013 rows=1 loops=16,582)

  • Index Cond: (id = u1.customer_id)
22. 182.402 182.402 ↑ 1.0 1 16,582

Index Scan using essays_order_pkey on essays_order u1 (cost=0.43..6.04 rows=1 width=12) (actual time=0.011..0.011 rows=1 loops=16,582)

23. 28.027 133.155 ↓ 385.6 16,582 1

Hash Join (cost=6,844.39..9,187.21 rows=43 width=24) (actual time=66.781..133.155 rows=16,582 loops=1)

  • Index Cond: (id = u0.order_id)
  • Hash Cond: (u0.writer_id = u6.id)
24. 64.992 64.992 ↓ 3.9 1,453 1

Hash (cost=6,468.31..6,468.31 rows=369 width=4) (actual time=64.991..64.992 rows=1,453 loops=1)

25. 0.000 40.136 ↓ 2.2 18,969 1

Bitmap Heap Scan on feedback_customer_feedback u0 (cost=371.48..2,681.66 rows=8,586 width=28) (actual time=1.760..40.136 rows=18,969 loops=1)

  • Rows Removed by Filter: 67
  • Heap Blocks: exact=1,744
  • Filter: ((NOT is_deleted) AND is_approved AND is_shareable AND ((comment)::text <> ''::text))
  • Buckets: 2,048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 68kB
26. 61.689 61.689 ↓ 3.9 1,453 1

Seq Scan on writers_writer u6 (cost=0.00..6,468.31 rows=369 width=4) (actual time=0.060..61.689 rows=1,453 loops=1)

27. 1.540 1.540 ↑ 1.0 19,036 1

Bitmap Index Scan on feedback_is_shareable__idx (cost=0.00..369.33 rows=19,855 width=0) (actual time=1.540..1.540 rows=19,036 loops=1)

  • Rows Removed by Filter: 49,665
  • Index Cond: (is_shareable = true)
  • Filter: ((status)::text ~~ 'active:%'::text)
Planning time : 2.185 ms