explain.depesz.com

PostgreSQL's explain analyze made readable

Result: f2kS

Settings
# exclusive inclusive rows x rows loops node
1. 0.023 315.844 ↓ 316.0 316 1

Limit (cost=40,574.54..40,574.55 rows=1 width=547) (actual time=315.783..315.844 rows=316 loops=1)

2. 0.000 315.821 ↓ 316.0 316 1

Sort (cost=40,574.54..40,574.55 rows=1 width=547) (actual time=315.782..315.821 rows=316 loops=1)

  • Sort Key: (json_extract_path_text(obj.fullobject, VARIADIC '{_id}'::text[]))
  • Sort Method: quicksort Memory: 589kB
3. 5.300 316.150 ↓ 316.0 316 1

Gather (cost=3,275.06..40,574.53 rows=1 width=547) (actual time=185.695..316.150 rows=316 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 1.516 310.850 ↓ 105.0 105 3 / 3

Nested Loop (cost=2,275.06..39,574.43 rows=1 width=547) (actual time=182.349..310.850 rows=105 loops=3)

  • Join Filter: (obj.objecttypes_id = objtype.id)
5. 306.642 309.229 ↓ 105.0 105 3 / 3

Parallel Bitmap Heap Scan on relationships obj (cost=2,275.06..39,573.13 rows=1 width=523) (actual time=182.315..309.229 rows=105 loops=3)

  • Recheck Cond: (((json_extract_path_text(fullobject, VARIADIC '{firstResourceCollection}'::text[]) = 'managed/user'::text) AND (json_extract_path_text(fullobject, VARIADIC '{firstResourceId}'::text[]) = '1b0bda20-358f-4863-bfdd-60
  • Filter: (((json_extract_path_text(fullobject, VARIADIC '{firstResourceCollection}'::text[]) = 'managed/user'::text) AND (json_extract_path_text(fullobject, VARIADIC '{firstResourceId}'::text[]) = '1b0bda20-358f-4863-bfdd-60da7fcb
  • Rows Removed by Filter: 31,870
  • Heap Blocks: exact=6,802
6. 0.000 2.587 ↓ 0.0 0 1 / 3

BitmapOr (cost=2,275.06..2,275.06 rows=94,144 width=0) (actual time=7.762..7.762 rows=0 loops=1)

7. 0.124 0.124 ↓ 409.5 819 1 / 3

Bitmap Index Scan on idx_json_relationships (cost=0.00..4.57 rows=2 width=0) (actual time=0.372..0.372 rows=819 loops=1)

  • Index Cond: ((json_extract_path_text(fullobject, VARIADIC '{firstResourceCollection}'::text[]) = 'managed/user'::text) AND (json_extract_path_text(fullobject, VARIADIC '{firstResourceId}'::text[]) = '1b0bda20-358f-486
8. 2.463 2.463 ↓ 1.1 100,479 1 / 3

Bitmap Index Scan on idx_json_relationships_secondresourcecollection (cost=0.00..2,270.49 rows=94,142 width=0) (actual time=7.389..7.389 rows=100,479 loops=1)

  • Index Cond: (json_extract_path_text(fullobject, VARIADIC '{secondResourceCollection}'::text[]) = 'managed/user'::text)
9. 0.105 0.105 ↑ 1.0 1 316 / 3

Seq Scan on objecttypes objtype (cost=0.00..1.29 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=316)

  • Filter: ((objecttype)::text = 'relationships'::text)
  • Rows Removed by Filter: 2
Planning time : 0.229 ms
Execution time : 317.201 ms