explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3uaN

Settings
# exclusive inclusive rows x rows loops node
1. 0.094 0.204 ↓ 2.0 71 1

Merge Join (cost=11.76..16.65 rows=36 width=32) (actual time=0.149..0.204 rows=71 loops=1)

  • Merge Cond: (r.id = c.value)
  • Join Filter: (NOT (hashed SubPlan 5))
2.          

Initplan (forMerge Join)

3. 0.000 0.002 ↑ 1.0 1 1

Result (cost=0.23..0.24 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=1)

4.          

Initplan (forResult)

5. 0.001 0.002 ↑ 1.0 1 1

Limit (cost=0.15..0.23 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=1)

6. 0.001 0.001 ↑ 806.0 1 1

Index Only Scan Backward using context_tables_pkey on context_tables (cost=0.15..62.26 rows=806 width=8) (actual time=0.001..0.001 rows=1 loops=1)

  • Index Cond: (id IS NOT NULL)
  • Heap Fetches: 1
7. 0.002 0.008 ↑ 1.0 1 1

Result (cost=0.23..0.24 rows=1 width=8) (actual time=0.008..0.008 rows=1 loops=1)

8.          

Initplan (forResult)

9. 0.001 0.006 ↑ 1.0 1 1

Limit (cost=0.15..0.23 rows=1 width=8) (actual time=0.006..0.006 rows=1 loops=1)

10. 0.005 0.005 ↑ 806.0 1 1

Index Only Scan Backward using context_tables_pkey on context_tables context_tables_1 (cost=0.15..62.26 rows=806 width=8) (actual time=0.005..0.005 rows=1 loops=1)

  • Index Cond: (id IS NOT NULL)
  • Heap Fetches: 1
11. 0.024 0.024 ↑ 77.3 81 1

Index Scan using resources_pkey on resources r (cost=0.28..220.24 rows=6,264 width=16) (actual time=0.009..0.024 rows=81 loops=1)

12. 0.019 0.049 ↑ 1.0 71 1

Sort (cost=6.60..6.77 rows=71 width=16) (actual time=0.045..0.049 rows=71 loops=1)

  • Sort Key: c.value
  • Sort Method: quicksort Memory: 28kB
13. 0.030 0.030 ↑ 1.0 71 1

Seq Scan on contexts c (cost=0.00..4.41 rows=71 width=16) (actual time=0.020..0.030 rows=71 loops=1)

  • Filter: (context_table_id = 1)
  • Rows Removed by Filter: 124
14.          

SubPlan (forMerge Join)

15. 0.027 0.027 ↓ 1.0 195 1

Seq Scan on contexts (cost=0.00..3.93 rows=193 width=24) (actual time=0.005..0.027 rows=195 loops=1)

Planning time : 0.197 ms
Execution time : 0.247 ms