explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8q43

Settings
# exclusive inclusive rows x rows loops node
1. 0.265 7.054 ↓ 0.0 0 1

Hash Semi Join (cost=353.44..2,188.79 rows=1 width=259) (actual time=7.054..7.054 rows=0 loops=1)

  • Hash Cond: (web_hooks.group_id = namespaces.id)
2. 6.666 6.666 ↑ 1.0 3,067 1

Index Scan using index_web_hooks_on_type on web_hooks (cost=0.42..1,827.68 rows=3,084 width=259) (actual time=0.032..6.666 rows=3,067 loops=1)

  • Index Cond: ((type)::text = 'GroupHook'::text)
3. 0.005 0.123 ↑ 2.3 9 1

Hash (cost=352.75..352.75 rows=21 width=4) (actual time=0.123..0.123 rows=9 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
4. 0.118 0.118 ↑ 2.3 9 1

CTE Scan on base_and_ancestors namespaces (cost=352.12..352.54 rows=21 width=4) (actual time=0.032..0.118 rows=9 loops=1)

5.          

CTE base_and_ancestors

6. 0.026 0.110 ↑ 2.3 9 1

Recursive Union (cost=0.43..352.12 rows=21 width=323) (actual time=0.031..0.110 rows=9 loops=1)

7. 0.021 0.021 ↑ 1.0 1 1

Index Scan using namespaces_pkey on namespaces namespaces_1 (cost=0.43..3.45 rows=1 width=323) (actual time=0.020..0.021 rows=1 loops=1)

  • Index Cond: (id = 3884680)
  • Filter: ((type)::text = 'Group'::text)
8. 0.009 0.063 ↑ 2.0 1 9

Nested Loop (cost=0.43..34.83 rows=2 width=323) (actual time=0.006..0.007 rows=1 loops=9)

9. 0.000 0.000 ↑ 10.0 1 9

WorkTable Scan on base_and_ancestors (cost=0.00..0.20 rows=10 width=4) (actual time=0.000..0.000 rows=1 loops=9)

10. 0.054 0.054 ↑ 1.0 1 9

Index Scan using namespaces_pkey on namespaces namespaces_2 (cost=0.43..3.45 rows=1 width=323) (actual time=0.006..0.006 rows=1 loops=9)

  • Index Cond: (id = base_and_ancestors.parent_id)
  • Filter: ((type)::text = 'Group'::text)
Planning time : 0.682 ms
Execution time : 7.185 ms