explain.depesz.com

PostgreSQL's explain analyze made readable

Result: A1Io

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 0.114 ↓ 2.0 2 1

Limit (cost=17.17..17.17 rows=1 width=4,235) (actual time=0.113..0.114 rows=2 loops=1)

2.          

CTE fdata

3. 0.001 0.100 ↓ 2.0 2 1

Nested Loop Left Join (cost=8.95..17.14 rows=1 width=2,714) (actual time=0.094..0.100 rows=2 loops=1)

4. 0.000 0.099 ↓ 2.0 2 1

Nested Loop (cost=8.80..16.74 rows=1 width=2,206) (actual time=0.093..0.099 rows=2 loops=1)

5. 0.000 0.095 ↓ 2.0 2 1

Nested Loop Left Join (cost=8.66..16.33 rows=1 width=1,174) (actual time=0.091..0.095 rows=2 loops=1)

6. 0.004 0.093 ↓ 2.0 2 1

Nested Loop (cost=8.52..15.93 rows=1 width=1,173) (actual time=0.089..0.093 rows=2 loops=1)

7. 0.012 0.083 ↓ 2.0 2 1

Hash Join (cost=8.39..15.08 rows=1 width=1,091) (actual time=0.082..0.083 rows=2 loops=1)

  • Hash Cond: (bo_a.owner_id = bo_b.uid)
8. 0.018 0.018 ↑ 1.0 195 1

Seq Scan on base_objects bo_a (cost=0.00..5.95 rows=195 width=549) (actual time=0.009..0.018 rows=195 loops=1)

9. 0.026 0.053 ↑ 1.0 195 1

Hash (cost=5.95..5.95 rows=195 width=542) (actual time=0.053..0.053 rows=195 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 19kB
10. 0.027 0.027 ↑ 1.0 195 1

Seq Scan on base_objects bo_b (cost=0.00..5.95 rows=195 width=542) (actual time=0.005..0.027 rows=195 loops=1)

11. 0.006 0.006 ↑ 1.0 1 2

Index Scan using devices_pkey on devices (cost=0.14..0.85 rows=1 width=90) (actual time=0.003..0.003 rows=1 loops=2)

  • Index Cond: ((uid = bo_a.uid) AND (uid = ANY ('{310,312,25,26}'::bigint[])))
12. 0.002 0.002 ↓ 0.0 0 2

Index Scan using device_connection_status_pkey on device_connection_status (cost=0.14..0.38 rows=1 width=9) (actual time=0.001..0.001 rows=0 loops=2)

  • Index Cond: (uid = bo_a.uid)
13. 0.004 0.004 ↑ 1.0 1 2

Index Scan using users_pkey on users (cost=0.14..0.40 rows=1 width=1,040) (actual time=0.001..0.002 rows=1 loops=2)

  • Index Cond: (uid = bo_a.owner_id)
14. 0.000 0.000 ↓ 0.0 0 2

Index Scan using user_avatars_pkey on user_avatars (cost=0.14..0.39 rows=1 width=524) (actual time=0.000..0.000 rows=0 loops=2)

  • Index Cond: (uid = bo_b.uid)
15. 0.010 0.113 ↓ 2.0 2 1

Sort (cost=0.03..0.04 rows=1 width=4,235) (actual time=0.113..0.113 rows=2 loops=1)

  • Sort Key: fdata.name
  • Sort Method: quicksort Memory: 25kB
16. 0.103 0.103 ↓ 2.0 2 1

CTE Scan on fdata (cost=0.00..0.02 rows=1 width=4,235) (actual time=0.096..0.103 rows=2 loops=1)

  • Filter: (portal_id = 12)
Planning time : 0.958 ms