explain.depesz.com

PostgreSQL's explain analyze made readable

Result: VL2G

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 88.607 ↑ 3.0 3 1

Limit (cost=1,577.79..1,577.82 rows=9 width=762) (actual time=88.605..88.607 rows=3 loops=1)

  • Buffers: shared hit=2693
2. 0.032 88.602 ↑ 3.0 3 1

Sort (cost=1,577.79..1,577.82 rows=9 width=762) (actual time=88.602..88.602 rows=3 loops=1)

  • Sort Key: issues.updated_at DESC, issues.id DESC
  • Sort Method: quicksort Memory: 30kB
  • Buffers: shared hit=2693
3. 0.012 88.570 ↑ 3.0 3 1

Nested Loop (cost=1,497.47..1,577.65 rows=9 width=762) (actual time=84.866..88.570 rows=3 loops=1)

  • Join Filter: ((issues.confidential IS NOT TRUE) OR (issues.confidential AND ((issues.author_id = 955795) OR (alternatives: SubPlan 1 or hashed SubPlan 2) OR (alternatives: SubPlan 3 or hashed SubPlan 4))))
  • Buffers: shared hit=2687
4. 0.205 0.205 ↑ 1.0 1 1

Index Only Scan using projects_pkey on projects (cost=0.43..3.45 rows=1 width=4) (actual time=0.153..0.205 rows=1 loops=1)

  • Index Cond: (id = 13083)
  • Heap Fetches: 2
  • Buffers: shared hit=7
5. 3.889 88.353 ↑ 3.0 3 1

Bitmap Heap Scan on issues (cost=1,497.03..1,510.75 rows=9 width=762) (actual time=84.706..88.353 rows=3 loops=1)

  • Recheck Cond: ((project_id = 13083) AND (((title)::text ~~* '%amex%'::text) OR (description ~~* '%amex%'::text)))
  • Rows Removed by Index Recheck: 11
  • Heap Blocks: exact=14
  • Buffers: shared hit=2680
6. 11.301 84.464 ↓ 0.0 0 1

BitmapAnd (cost=1,497.03..1,497.03 rows=9 width=0) (actual time=84.464..84.464 rows=0 loops=1)

  • Buffers: shared hit=2624
7. 17.436 17.436 ↓ 1.0 51,827 1

Bitmap Index Scan on index_issues_on_project_id_and_iid (cost=0.00..737.44 rows=51,267 width=0) (actual time=17.436..17.436 rows=51,827 loops=1)

  • Index Cond: (project_id = 13083)
  • Buffers: shared hit=287
8. 0.003 55.727 ↓ 0.0 0 1

BitmapOr (cost=759.34..759.34 rows=2,645 width=0) (actual time=55.727..55.727 rows=0 loops=1)

  • Buffers: shared hit=2337
9. 21.653 21.653 ↑ 2.1 704 1

Bitmap Index Scan on index_issues_on_title_trigram (cost=0.00..720.85 rows=1,513 width=0) (actual time=21.653..21.653 rows=704 loops=1)

  • Index Cond: ((title)::text ~~* '%amex%'::text)
  • Buffers: shared hit=891
10. 34.071 34.071 ↓ 9.3 10,477 1

Bitmap Index Scan on index_issues_on_description_trigram (cost=0.00..38.49 rows=1,132 width=0) (actual time=34.071..34.071 rows=10,477 loops=1)

  • Index Cond: (description ~~* '%amex%'::text)
  • Buffers: shared hit=1446
11.          

SubPlan (forNested Loop)

12. 0.000 0.000 ↓ 0.0 0

Index Only Scan using index_issue_assignees_on_issue_id_and_user_id on issue_assignees (cost=0.43..3.45 rows=1 width=0) (never executed)

  • Index Cond: ((issue_id = issues.id) AND (user_id = 955795))
  • Heap Fetches: 0
13. 0.000 0.000 ↓ 0.0 0

Index Scan using index_issue_assignees_on_user_id on issue_assignees issue_assignees_1 (cost=0.43..60.47 rows=55 width=4) (never executed)

  • Index Cond: (user_id = 955795)
14. 0.000 0.000 ↓ 0.0 0

Index Only Scan using index_project_authorizations_on_user_id_project_id_access_level on project_authorizations (cost=0.56..3.58 rows=1 width=0) (never executed)

  • Index Cond: ((user_id = 955795) AND (project_id = projects.id) AND (access_level >= 20))
  • Heap Fetches: 0
15. 0.000 0.000 ↓ 0.0 0

Index Only Scan using index_project_authorizations_on_user_id_project_id_access_level on project_authorizations project_authorizations_1 (cost=0.56..371.60 rows=1,340 width=4) (never executed)

  • Index Cond: ((user_id = 955795) AND (access_level >= 20))
  • Heap Fetches: 0
Planning time : 22.569 ms
Execution time : 89.054 ms