explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Cz5

Settings
# exclusive inclusive rows x rows loops node
1. 0.017 0.600 ↓ 0.0 0 1

Nested Loop Left Join (cost=22.99..25.34 rows=1 width=252) (actual time=0.592..0.600 rows=0 loops=1)

  • Join Filter: (allowed."categoryId" = "allowed->category".id)
2. 0.015 0.583 ↓ 0.0 0 1

Nested Loop (cost=22.99..24.07 rows=1 width=196) (actual time=0.576..0.583 rows=0 loops=1)

  • Join Filter: ((project.id = allowed."projectId") AND ((allowed."categoryId" = 6) OR (project.category = 'Field projects'::text)))
3. 0.016 0.568 ↓ 0.0 0 1

Limit (cost=22.99..22.99 rows=1 width=184) (actual time=0.560..0.568 rows=0 loops=1)

4. 0.021 0.552 ↓ 0.0 0 1

Sort (cost=22.99..22.99 rows=1 width=184) (actual time=0.544..0.552 rows=0 loops=1)

  • Sort Key: project.title
  • Sort Method: quicksort Memory: 25kB
5. 0.118 0.531 ↓ 0.0 0 1

Bitmap Heap Scan on project (cost=8.59..22.98 rows=1 width=184) (actual time=0.523..0.531 rows=0 loops=1)

  • Recheck Cond: (("organizationId" = 2) OR ((status = 'TEMPLATE'::text) AND (status = 'TEMPLATE'::text)))
  • Filter: (("deletedAt" IS NULL) AND (status = 'TEMPLATE'::text) AND (("authorId" = 14) OR (status = ANY ('{PUBLISHED,FROZEN,CASHEDOUT,DELIVERED,ENDED,TEMPLATE,CANCELLED,UNDER_REVIEW}'::text[])) OR (id = 4)) AND ((SubPlan 1) IS NOT NULL))
  • Rows Removed by Filter: 13
  • Heap Blocks: exact=2
6. 0.016 0.133 ↓ 0.0 0 1

BitmapOr (cost=8.59..8.59 rows=3 width=0) (actual time=0.126..0.133 rows=0 loops=1)

7. 0.094 0.094 ↑ 1.0 3 1

Bitmap Index Scan on idx_17034_project_organization_id (cost=0.00..4.30 rows=3 width=0) (actual time=0.086..0.094 rows=3 loops=1)

  • Index Cond: ("organizationId" = 2)
8. 0.023 0.023 ↓ 10.0 10 1

Bitmap Index Scan on idx_17034_project_status (cost=0.00..4.29 rows=1 width=0) (actual time=0.015..0.023 rows=10 loops=1)

  • Index Cond: ((status = 'TEMPLATE'::text) AND (status = 'TEMPLATE'::text))
9.          

SubPlan (for Bitmap Heap Scan)

10. 0.170 0.280 ↓ 0.0 0 10

Limit (cost=0.00..1.08 rows=1 width=8) (actual time=0.027..0.028 rows=0 loops=10)

11. 0.110 0.110 ↓ 0.0 0 10

Seq Scan on "organizationTemplate" allowed_1 (cost=0.00..1.08 rows=1 width=8) (actual time=0.010..0.011 rows=0 loops=10)

  • Filter: (("deletedAt" IS NULL) AND ("organizationId" = 2) AND ("projectId" = project.id) AND (("categoryId" = 6) OR (project.category = 'Field projects'::text)))
  • Rows Removed by Filter: 4
12. 0.000 0.000 ↓ 0.0 0

Seq Scan on "organizationTemplate" allowed (cost=0.00..1.05 rows=1 width=20) (never executed)

  • Filter: (("deletedAt" IS NULL) AND ("organizationId" = 2))
13. 0.000 0.000 ↓ 0.0 0

Seq Scan on category "allowed->category" (cost=0.00..1.12 rows=12 width=56) (never executed)

  • Filter: ("deletedAt" IS NULL)
Planning time : 0.416 ms
Execution time : 0.843 ms