explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mJPE

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.008 137,247.075 ↑ 1.0 1 1

Limit (cost=13,576,100.91..13,576,101.03 rows=1 width=26) (actual time=137,246.738..137,247.075 rows=1 loops=1)

2. 91,470.544 137,247.067 ↑ 23,525,056.0 1 1

Gather Merge (cost=13,576,100.91..16,320,882.41 rows=23,525,056 width=26) (actual time=137,246.735..137,247.067 rows=1 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 13.393 45,776.523 ↓ 0.0 0 3 / 3

Sort (cost=13,575,100.89..13,604,507.21 rows=11,762,528 width=26) (actual time=45,776.523..45,776.523 rows=0 loops=3)

  • Sort Key: abandoned_carts.scheduled_at DESC
  • Sort Method: top-N heapsort Memory: 25kB
  • Worker 0: Sort Method: quicksort Memory: 25kB
  • Worker 1: Sort Method: quicksort Memory: 25kB
4. 9.261 45,763.130 ↑ 752.1 15,639 3 / 3

Nested Loop (cost=43.74..13,516,288.25 rows=11,762,528 width=26) (actual time=207.898..45,763.130 rows=15,639 loops=3)

5. 22,734.535 42,109.739 ↑ 4,211.5 67 3 / 3

Nested Loop (cost=43.32..3,475,192.55 rows=282,173 width=28) (actual time=200.127..42,109.739 rows=67 loops=3)

  • Join Filter: ((products.uid)::text = ANY (regexp_split_to_array(btrim(regexp_replace(abandoned_carts.product_uids, '[\n\r''-]+'::text, ' '::text, 'g'::text)), '\D+'::text)))
  • Rows Removed by Join Filter: 4618285
6. 75.807 78.346 ↓ 0.0 0 3 / 3

Parallel Bitmap Heap Scan on abandoned_carts (cost=43.32..3,848.58 rows=1 width=34) (actual time=78.345..78.346 rows=0 loops=3)

  • Recheck Cond: (store_id = 3420)
  • Filter: (((status)::text <> 'preview'::text) AND ((email)::text = 'fquahe@icloud.com'::text))
  • Rows Removed by Filter: 1286
  • Heap Blocks: exact=2450
7. 2.539 2.539 ↓ 1.1 3,860 1 / 3

Bitmap Index Scan on index_abandoned_carts_on_store_id (cost=0.00..43.32 rows=3,665 width=0) (actual time=7.617..7.617 rows=3,860 loops=1)

  • Index Cond: (store_id = 3420)
8. 19,296.858 19,296.858 ↓ 1.0 13,855,057 1 / 3

Seq Scan on products (cost=0.00..2,986,528.66 rows=13,851,866 width=28) (actual time=2.960..57,890.574 rows=13,855,057 loops=1)

9. 3,644.130 3,644.130 ↓ 5.5 233 201 / 3

Index Scan using index_product_collections_on_uid on product_collections (cost=0.42..35.16 rows=42 width=26) (actual time=0.515..54.390 rows=233 loops=201)

  • Index Cond: ((uid)::text = ANY (products.category_uids))
Planning time : 0.345 ms
Execution time : 137,247.205 ms