explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 32vs

Settings
# exclusive inclusive rows x rows loops node
1. 0.219 0.745 ↓ 29.0 29 1

WindowAgg (cost=0.25..14.36 rows=1 width=147) (actual time=0.241..0.745 rows=29 loops=1)

2. 0.028 0.120 ↓ 29.0 29 1

Nested Loop (cost=0.25..7.77 rows=1 width=185) (actual time=0.051..0.120 rows=29 loops=1)

  • Join Filter: (query.query @@ o.search_index)
  • Rows Removed by Join Filter: 16
3. 0.031 0.031 ↑ 1.0 1 1

Function Scan on to_tsquery query (cost=0.25..0.26 rows=1 width=32) (actual time=0.031..0.031 rows=1 loops=1)

4. 0.061 0.061 ↓ 1.0 45 1

Seq Scan on organisations o (cost=0.00..6.97 rows=43 width=153) (actual time=0.015..0.061 rows=45 loops=1)

  • Filter: ((NOT is_deleted) AND (status = 'Approved'::text))
  • Rows Removed by Filter: 33
5.          

SubPlan (forWindowAgg)

6. 0.116 0.406 ↑ 1.0 1 29

Aggregate (cost=6.55..6.56 rows=1 width=8) (actual time=0.013..0.014 rows=1 loops=29)

7. 0.290 0.290 ↑ 1.0 1 29

Seq Scan on brands b (cost=0.00..6.55 rows=1 width=0) (actual time=0.007..0.010 rows=1 loops=29)

  • Filter: (organisation_id = o.id)
  • Rows Removed by Filter: 43