explain.depesz.com

PostgreSQL's explain analyze made readable

Result: YC6M

Settings
# exclusive inclusive rows x rows loops node
1. 0.061 0.543 ↑ 48.1 30 1

Sort (cost=378.94..382.55 rows=1,444 width=84) (actual time=0.538..0.543 rows=30 loops=1)

  • Sort Key: r.id
  • Sort Method: quicksort Memory: 26kB
2.          

CTE r

3. 0.065 0.459 ↑ 48.1 30 1

Recursive Union (cost=0.00..274.28 rows=1,444 width=84) (actual time=0.021..0.459 rows=30 loops=1)

4. 0.026 0.026 ↑ 4.0 1 1

Seq Scan on ts_user (cost=0.00..19.00 rows=4 width=84) (actual time=0.019..0.026 rows=1 loops=1)

  • Filter: ((id)::text = '1'::text)
  • Rows Removed by Filter: 29
5. 0.192 0.368 ↑ 72.0 2 16

Hash Join (cost=1.30..22.64 rows=144 width=84) (actual time=0.019..0.023 rows=2 loops=16)

  • Hash Cond: ((ts_user_1.parent_id)::text = (r_1.id)::text)
6. 0.128 0.128 ↑ 24.0 30 16

Seq Scan on ts_user ts_user_1 (cost=0.00..17.20 rows=720 width=84) (actual time=0.002..0.008 rows=30 loops=16)

7. 0.032 0.048 ↑ 20.0 2 16

Hash (cost=0.80..0.80 rows=40 width=28) (actual time=0.003..0.003 rows=2 loops=16)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
8. 0.016 0.016 ↑ 20.0 2 16

WorkTable Scan on r r_1 (cost=0.00..0.80 rows=40 width=28) (actual time=0.001..0.001 rows=2 loops=16)

9. 0.482 0.482 ↑ 48.1 30 1

CTE Scan on r (cost=0.00..28.88 rows=1,444 width=84) (actual time=0.023..0.482 rows=30 loops=1)

Planning time : 0.250 ms
Execution time : 0.606 ms