explain.depesz.com

PostgreSQL's explain analyze made readable

Result: C7RU

Settings
# exclusive inclusive rows x rows loops node
1. 0.014 106.189 ↓ 1.3 4 1

GroupAggregate (cost=16,504.73..16,946.88 rows=3 width=1,564) (actual time=106.145..106.189 rows=4 loops=1)

  • Group Key: ptc.category_id, pc.id
2. 0.032 106.175 ↓ 5.0 15 1

Nested Loop (cost=16,504.73..16,946.82 rows=3 width=1,556) (actual time=105.809..106.175 rows=15 loops=1)

  • Join Filter: (ptc.category_id = pc.id)
  • Rows Removed by Join Filter: 202
3. 0.016 0.016 ↑ 1.1 7 1

Index Scan using project_category_pkey on project_category pc (cost=0.14..12.39 rows=8 width=1,552) (actual time=0.008..0.016 rows=7 loops=1)

  • Filter: is_top
  • Rows Removed by Filter: 10
4. 0.028 106.127 ↓ 5.2 31 7

Materialize (cost=16,504.59..16,933.73 rows=6 width=4) (actual time=15.107..15.161 rows=31 loops=7)

5. 0.023 106.099 ↓ 5.2 31 1

Hash Join (cost=16,504.59..16,933.70 rows=6 width=4) (actual time=105.744..106.099 rows=31 loops=1)

  • Hash Cond: (t.id = ptc.project_id)
6. 0.000 106.018 ↓ 2.8 31 1

Index Scan using project_pkey on project t (cost=16,500.84..16,929.82 rows=11 width=4) (actual time=105.680..106.018 rows=31 loops=1)

  • Filter: ((NOT is_private) AND (NOT (hashed SubPlan 1)) AND ((min_subscribers IS NULL) OR (min_subscribers < 484513)) AND ((status)::text = ANY ('{active,search_bloggers}'::text[])) AND ((id = ANY ('{184,126,172,115,152,207,165,60,122,102,183,59,88,63,93,193,22,84,5,144,147,110,62,192,92,79,105,55,157,109,149,180,23,1,46,98,167,58,68,139,54,47,69,90,74,176,82,48,113,85,104,161,96,120,124,148,112,32,111,45}'::integer[])) OR ((status)::text <> ALL ('{stopped,pause,draft}'::text[]))) AND ((SubPlan 2) OR (SubPlan 3) OR (SubPlan 4)))
  • Rows Removed by Filter: 177
7.          

SubPlan (for Index Scan)

8. 7.679 108.808 ↓ 1.4 133 1

Gather (cost=1,000.00..16,500.47 rows=92 width=4) (actual time=1.075..108.808 rows=133 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
9. 101.129 101.129 ↓ 1.2 44 3 / 3

Parallel Seq Scan on project_blogger (cost=0.00..15,491.27 rows=38 width=4) (actual time=0.847..101.129 rows=44 loops=3)

  • Filter: ((((status)::text <> 'draft'::text) OR is_request) AND (id = ANY ('{40129,13688,955,140280}'::integer[])))
  • Rows Removed by Filter: 225614
10. 0.093 0.093 ↑ 50.0 2 31

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual time=0.002..0.003 rows=2 loops=31)

11. 0.000 0.000 ↑ 1.0 1 31

Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.000..0.000 rows=1 loops=31)

12. 0.030 0.030 ↑ 100.0 1 30

ProjectSet (cost=0.00..0.52 rows=100 width=32) (actual time=0.001..0.001 rows=1 loops=30)

13. 0.000 0.000 ↑ 1.0 1 30

Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.000..0.000 rows=1 loops=30)

14. 0.000 0.000 ↓ 0.0 0

ProjectSet (cost=0.00..0.52 rows=100 width=32) (never executed)

15. 0.000 0.000 ↓ 0.0 0

Result (cost=0.00..0.01 rows=1 width=0) (never executed)

16. 0.028 0.058 ↑ 1.0 122 1

Hash (cost=2.22..2.22 rows=122 width=8) (actual time=0.058..0.058 rows=122 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
17. 0.030 0.030 ↑ 1.0 122 1

Seq Scan on project_to_category ptc (cost=0.00..2.22 rows=122 width=8) (actual time=0.009..0.030 rows=122 loops=1)

Planning time : 0.786 ms
Execution time : 109.800 ms