explain.depesz.com

PostgreSQL's explain analyze made readable

Result: oh68

Settings
# exclusive inclusive rows x rows loops node
1. 0.006 247.351 ↑ 1.0 50 1

Limit (cost=4,974.10..4,974.23 rows=50 width=100) (actual time=247.341..247.351 rows=50 loops=1)

2. 0.138 247.345 ↑ 24.5 50 1

Sort (cost=4,974.10..4,977.16 rows=1,225 width=100) (actual time=247.340..247.345 rows=50 loops=1)

  • Sort Key: (similarity(COALESCE(((("user" -> 'first_name'::text) || ' '::text) || ("user" -> 'last_name'::text)), (((shipping_address -> 'first_name'::text) || ' '::text) || (shipping_address -> 'last_name'::text))), 'Devin Marsh'::text)) DESC
  • Sort Method: quicksort Memory: 28kB
3. 185.704 247.207 ↑ 18.6 66 1

Bitmap Heap Scan on orders (cost=317.81..4,933.41 rows=1,225 width=100) (actual time=68.610..247.207 rows=66 loops=1)

  • Recheck Cond: ((((("user" -> 'first_name'::text) || ' '::text) || ("user" -> 'last_name'::text)) % 'Devin Marsh'::text) OR ((((shipping_address -> 'first_name'::text) || ' '::text) || (shipping_address -> 'last_name'::text)) % 'Devin Marsh'::text))
  • Rows Removed by Index Recheck: 13773
  • Heap Blocks: exact=13242
4. 0.002 61.503 ↓ 0.0 0 1

BitmapOr (cost=317.81..317.81 rows=1,226 width=0) (actual time=61.503..61.503 rows=0 loops=1)

5. 26.277 26.277 ↓ 17.3 10,577 1

Bitmap Index Scan on trgm_idx_users_full_name (cost=0.00..160.60 rows=613 width=0) (actual time=26.277..26.277 rows=10,577 loops=1)

  • Index Cond: (((("user" -> 'first_name'::text) || ' '::text) || ("user" -> 'last_name'::text)) % 'Devin Marsh'::text)
6. 35.224 35.224 ↓ 20.7 12,662 1

Bitmap Index Scan on trgm_idx_users_full_name_shipping (cost=0.00..156.60 rows=613 width=0) (actual time=35.224..35.224 rows=12,662 loops=1)

  • Index Cond: ((((shipping_address -> 'first_name'::text) || ' '::text) || (shipping_address -> 'last_name'::text)) % 'Devin Marsh'::text)
Planning time : 0.352 ms
Execution time : 247.512 ms