explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xJel

Settings
# exclusive inclusive rows x rows loops node
1. 0.025 1.046 ↑ 2.6 20 1

Sort (cost=585.64..585.78 rows=53 width=122) (actual time=1.044..1.046 rows=20 loops=1)

  • Sort Key: recent_access.date_created DESC
  • Sort Method: quicksort Memory: 27kB
2. 0.031 1.021 ↑ 2.6 20 1

HashAggregate (cost=583.60..584.13 rows=53 width=122) (actual time=1.014..1.021 rows=20 loops=1)

  • Group Key: recent_access.object_id, item.title, recent_access.date_created
3. 0.007 0.990 ↑ 2.6 20 1

Append (cost=1.11..583.20 rows=53 width=122) (actual time=0.134..0.990 rows=20 loops=1)

4. 0.015 0.730 ↑ 1.1 20 1

Nested Loop (cost=1.11..245.11 rows=21 width=35) (actual time=0.133..0.730 rows=20 loops=1)

5. 0.029 0.475 ↑ 1.1 20 1

Nested Loop (cost=0.84..238.22 rows=21 width=45) (actual time=0.100..0.475 rows=20 loops=1)

6. 0.066 0.066 ↑ 1.1 20 1

Index Scan using recent_access_user_type_date on recent_access (cost=0.42..61.19 rows=21 width=17) (actual time=0.053..0.066 rows=20 loops=1)

  • Index Cond: (((user_id)::text = 'user1007'::text) AND ((access_type)::text = 'objects'::text))
7. 0.380 0.380 ↑ 1.0 1 20

Index Scan using item_pk on item (cost=0.41..8.43 rows=1 width=36) (actual time=0.019..0.019 rows=1 loops=20)

  • Index Cond: ((id)::text = (recent_access.object_id)::text)
  • Filter: (NOT is_deleted)
8. 0.240 0.240 ↑ 1.0 1 20

Index Scan using folder_pk on folder (cost=0.28..0.33 rows=1 width=10) (actual time=0.012..0.012 rows=1 loops=20)

  • Index Cond: ((id)::text = (item.folder_id)::text)
  • Filter: (NOT is_deleted)
9. 0.001 0.145 ↓ 0.0 0 1

Subquery Scan on *SELECT* 2 (cost=0.70..195.60 rows=21 width=49) (actual time=0.145..0.145 rows=0 loops=1)

10. 0.021 0.144 ↓ 0.0 0 1

Nested Loop (cost=0.70..195.39 rows=21 width=40) (actual time=0.144..0.144 rows=0 loops=1)

11. 0.043 0.043 ↑ 1.1 20 1

Index Scan using recent_access_user_type_date on recent_access recent_access_1 (cost=0.42..61.19 rows=21 width=17) (actual time=0.034..0.043 rows=20 loops=1)

  • Index Cond: (((user_id)::text = 'user1007'::text) AND ((access_type)::text = 'objects'::text))
12. 0.080 0.080 ↓ 0.0 0 20

Index Scan using folder_pk on folder folder_1 (cost=0.28..6.39 rows=1 width=33) (actual time=0.004..0.004 rows=0 loops=20)

  • Index Cond: ((id)::text = (recent_access_1.object_id)::text)
  • Filter: (NOT is_deleted)
13. 0.061 0.068 ↓ 0.0 0 1

Hash Join (cost=11.56..72.38 rows=10 width=533) (actual time=0.068..0.068 rows=0 loops=1)

  • Hash Cond: ((recent_access_2.object_id)::text = (document_review.id)::text)
  • -> Index Scan using recent_access_user_type_date on recent_access recent_access_2 (cost=0.42..61.19 rows=21 width=17)(actual time=0.034..0.034 rows=1 loops=1)
  • Index Cond: (((user_id)::text = 'user1007'::text) AND ((access_type)::text = 'objects'::text))
14. 0.001 0.007 ↓ 0.0 0 1

Hash (cost=10.70..10.70 rows=35 width=598) (actual time=0.007..0.007 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
15. 0.006 0.006 ↓ 0.0 0 1

Seq Scan on document_review (cost=0.00..10.70 rows=35 width=598) (actual time=0.006..0.006 rows=0 loops=1)

  • Filter: (NOT is_deleted)
16. 0.000 0.040 ↓ 0.0 0 1

Nested Loop (cost=0.57..69.53 rows=1 width=533) (actual time=0.040..0.040 rows=0 loops=1)

17. 0.040 0.040 ↓ 0.0 0 1

Index Scan using recent_access_user_type_date on recent_access recent_access_3 (cost=0.42..61.24 rows=1 width=27) (actual time=0.040..0.040 rows=0 loops=1)

  • Index Cond: (((user_id)::text = 'user1007'::text) AND ((access_type)::text = 'objects'::text))
  • Filter: ((object_id)::text ~~ 'glpl%'::text)
  • Rows Removed by Filter: 20
18. 0.000 0.000 ↓ 0.0 0

Index Scan using ia_recent_access_pk on ia_recent_access_obj (cost=0.14..8.16 rows=1 width=598) (never executed)

  • Index Cond: ((id)::text = (recent_access_3.id)::text)
Planning time : 2.525 ms
Execution time : 1.348 ms