explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XAoB

Settings
# exclusive inclusive rows x rows loops node
1. 0.314 11.622 ↑ 2.4 599 1

Nested Loop (cost=1.56..3,188.92 rows=1,466 width=601) (actual time=0.072..11.622 rows=599 loops=1)

2. 0.057 6.516 ↑ 2.5 599 1

Nested Loop (cost=1.12..2,403.22 rows=1,510 width=8) (actual time=0.057..6.516 rows=599 loops=1)

3. 1.667 1.667 ↑ 1.8 599 1

Index Scan using index_routes_on_path_text_pattern_ops on routes rs (cost=0.56..3.59 rows=1,057 width=4) (actual time=0.029..1.667 rows=599 loops=1)

  • Index Cond: (((path)::text ~>=~ 'gitlab-org/'::text) AND ((path)::text ~<~ 'gitlab-org0'::text))
  • Filter: (((path)::text ~~ 'gitlab-org/%'::text) AND ((source_type)::text = 'Project'::text))
  • Rows Removed by Filter: 64
4. 4.792 4.792 ↑ 1.0 1 599

Index Only Scan using index_routes_on_source_type_and_source_id on routes (cost=0.56..2.26 rows=1 width=4) (actual time=0.008..0.008 rows=1 loops=599)

  • Index Cond: ((source_type = 'Project'::text) AND (source_id = rs.source_id))
  • Heap Fetches: 103
5. 4.792 4.792 ↑ 1.0 1 599

Index Scan using projects_pkey on projects (cost=0.43..0.51 rows=1 width=601) (actual time=0.008..0.008 rows=1 loops=599)

  • Index Cond: (id = routes.source_id)
Planning time : 1.709 ms
Execution time : 11.804 ms