explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 98gi

Settings
# exclusive inclusive rows x rows loops node
1. 0.127 436.715 ↓ 795.0 795 1

Unique (cost=6,919.29..6,919.30 rows=1 width=92) (actual time=436.459..436.715 rows=795 loops=1)

2. 1.280 436.588 ↓ 800.0 800 1

Sort (cost=6,919.29..6,919.29 rows=1 width=92) (actual time=436.457..436.588 rows=800 loops=1)

  • Sort Key: feedback_customer_feedback.order_id
  • Sort Method: quicksort Memory: 87kB
3. 0.648 435.308 ↓ 800.0 800 1

Nested Loop (cost=3,960.56..6,919.28 rows=1 width=92) (actual time=36.553..435.308 rows=800 loops=1)

4. 0.912 429.860 ↓ 800.0 800 1

Nested Loop (cost=3,960.28..6,918.97 rows=1 width=100) (actual time=36.530..429.860 rows=800 loops=1)

5. 126.881 417.748 ↓ 800.0 800 1

Nested Loop Left Join (cost=3,959.86..6,913.85 rows=1 width=100) (actual time=36.502..417.748 rows=800 loops=1)

  • Join Filter: (writers_writer.id = writers_widget_stats_view.writer_id)
  • Rows Removed by Join Filter: 1,159,200
6. 9.089 184.467 ↓ 800.0 800 1

Nested Loop (cost=3,959.86..6,886.30 rows=1 width=32) (actual time=36.212..184.467 rows=800 loops=1)

7. 10.744 66.619 ↓ 485.5 15,537 1

Hash Join (cost=3,951.13..6,413.02 rows=32 width=24) (actual time=35.352..66.619 rows=15,537 loops=1)

  • Hash Cond: (feedback_customer_feedback.writer_id = writers_writer.id)
8. 20.837 22.513 ↓ 2.8 17,755 1

Bitmap Heap Scan on feedback_customer_feedback (cost=376.67..2,814.17 rows=6,418 width=20) (actual time=1.949..22.513 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: 1,281
  • Heap Blocks: exact=1,744
9. 1.676 1.676 ↑ 1.1 19,036 1

Bitmap Index Scan on feedback_is_shareable__idx (cost=0.00..375.06 rows=20,086 width=0) (actual time=1.676..1.676 rows=19,036 loops=1)

  • Index Cond: (is_shareable = true)
10. 0.609 33.362 ↓ 5.7 1,450 1

Hash (cost=3,571.27..3,571.27 rows=255 width=4) (actual time=33.362..33.362 rows=1,450 loops=1)

  • Buckets: 2,048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 67kB
11. 32.753 32.753 ↓ 5.7 1,450 1

Seq Scan on writers_writer (cost=0.00..3,571.27 rows=255 width=4) (actual time=0.079..32.753 rows=1,450 loops=1)

  • Filter: ((status)::text ~~ 'active:%'::text)
  • Rows Removed by Filter: 49,671
12. 108.745 108.759 ↓ 0.0 0 15,537

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

  • Index Cond: (id = feedback_customer_feedback.order_id)
  • Filter: ((level_work_id = 2) AND (paper_subject_id = 359) AND (NOT (hashed SubPlan 1)))
  • Rows Removed by Filter: 1
13.          

SubPlan (for Index Scan)

14. 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 = 617,936)
  • Filter: is_active
15. 106.400 106.400 ↓ 1.9 1,450 800

Seq Scan on writers_widget_stats_view (cost=0.00..17.80 rows=780 width=76) (actual time=0.005..0.133 rows=1,450 loops=800)

16. 11.200 11.200 ↑ 1.0 1 800

Index Scan using customers_customer_pkey on customers_customer (cost=0.42..5.11 rows=1 width=12) (actual time=0.013..0.014 rows=1 loops=800)

  • Index Cond: (id = essays_order.customer_id)
17. 4.800 4.800 ↑ 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.005..0.006 rows=1 loops=800)

  • Index Cond: (id = customers_customer.site_id)
  • Filter: (region_id = 2)
Planning time : 2.202 ms
Execution time : 437.012 ms