explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CdlB

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 132.894 ↑ 1.0 20 1

Limit (cost=5,514.98..5,515.03 rows=20 width=761) (actual time=132.889..132.894 rows=20 loops=1)

2. 4.808 132.891 ↑ 3.0 20 1

Sort (cost=5,514.98..5,515.13 rows=60 width=761) (actual time=132.888..132.891 rows=20 loops=1)

  • Sort Key: ((((similarity((COALESCE(projects.path, ''::character varying))::text, 'git'::text) * '1'::double precision) + (similarity((COALESCE(projects.name, ''::character varying))::text, 'git'::text) * '0.7'::double precision)) + (similarity(COALESCE(projects.description, ''::text), 'git'::text) * '0.2'::double precision))) DESC, projects.id
  • Sort Method: top-N heapsort Memory: 45kB
3. 40.274 128.083 ↓ 49.6 2,976 1

Nested Loop Left Join (cost=2.00..5,513.39 rows=60 width=761) (actual time=0.155..128.083 rows=2,976 loops=1)

  • Filter: ((project_features.issues_access_level > 0) OR (project_features.issues_access_level IS NULL))
  • Rows Removed by Filter: 128
4. 3.176 66.081 ↓ 50.9 3,104 1

Nested Loop (cost=1.57..5,482.44 rows=61 width=753) (actual time=0.082..66.081 rows=3,104 loops=1)

5. 2.113 31.545 ↓ 2.5 3,136 1

Nested Loop (cost=1.01..4,660.19 rows=1,271 width=757) (actual time=0.049..31.545 rows=3,136 loops=1)

6. 2.696 2.696 ↓ 2.6 3,342 1

Index Only Scan using index_project_authorizations_on_user_id_project_id_access_level on project_authorizations (cost=0.57..197.51 rows=1,296 width=4) (actual time=0.026..2.696 rows=3,342 loops=1)

  • Index Cond: ((user_id = 4,156,052) AND (access_level >= 20))
  • Heap Fetches: 640
7. 26.736 26.736 ↑ 1.0 1 3,342

Index Scan using projects_pkey on projects (cost=0.43..3.44 rows=1 width=753) (actual time=0.008..0.008 rows=1 loops=3,342)

  • Index Cond: (id = project_authorizations.project_id)
  • Filter: ((NOT archived) AND (id <> 278964))
  • Rows Removed by Filter: 0
8. 31.360 31.360 ↑ 1.0 1 3,136

Index Scan using index_routes_on_source_type_and_source_id on routes (cost=0.56..0.64 rows=1 width=51) (actual time=0.010..0.010 rows=1 loops=3,136)

  • Index Cond: (((source_type)::text = 'Project'::text) AND (source_id = projects.id))
  • Filter: (((path)::text ~~* '%git%'::text) OR ((name)::text ~~* '%git%'::text) OR (projects.description ~~* '%git%'::text))
  • Rows Removed by Filter: 0
9. 21.728 21.728 ↑ 1.0 1 3,104

Index Scan using index_project_features_on_project_id on project_features (cost=0.43..0.48 rows=1 width=8) (actual time=0.007..0.007 rows=1 loops=3,104)

  • Index Cond: (projects.id = project_id)
Planning time : 10.740 ms
Execution time : 133.090 ms