explain.depesz.com

PostgreSQL's explain analyze made readable

Result: VAYf

Settings
# exclusive inclusive rows x rows loops node
1. 0.162 962.580 ↑ 23,674.5 2 1

Nested Loop (cost=577.99..113,714.98 rows=47,349 width=157) (actual time=152.148..962.580 rows=2 loops=1)

2. 0.049 83.025 ↓ 43.0 43 1

Nested Loop Left Join (cost=575.74..1,092.04 rows=1 width=960) (actual time=69.403..83.025 rows=43 loops=1)

3. 0.047 82.718 ↓ 43.0 43 1

Nested Loop Left Join (cost=575.32..1,079.55 rows=1 width=952) (actual time=69.393..82.718 rows=43 loops=1)

4. 0.033 82.026 ↓ 43.0 43 1

Nested Loop Left Join (cost=574.89..1,071.09 rows=1 width=948) (actual time=69.366..82.026 rows=43 loops=1)

5. 1.239 81.864 ↓ 43.0 43 1

Nested Loop (cost=574.75..1,068.68 rows=1 width=920) (actual time=69.357..81.864 rows=43 loops=1)

6. 5.795 74.153 ↓ 157.9 6,472 1

Bitmap Heap Scan on orders_document_storage (cost=574.46..735.15 rows=41 width=20) (actual time=68.766..74.153 rows=6,472 loops=1)

  • Recheck Cond: ((((data -> 'data'::text) ->> 'cancelled_at'::text) IS NULL) AND ((created_at)::date > (('now'::cstring)::date - 5)))
  • Heap Blocks: exact=2396
7. 2.503 68.358 ↓ 0.0 0 1

BitmapAnd (cost=574.46..574.46 rows=41 width=0) (actual time=68.358..68.358 rows=0 loops=1)

8. 65.011 65.011 ↓ 193.0 792,690 1

Bitmap Index Scan on orders_document_storage_expr_idx1 (cost=0.00..68.96 rows=4,107 width=0) (actual time=65.011..65.011 rows=792,690 loops=1)

9. 0.844 0.844 ↑ 1.1 7,302 1

Bitmap Index Scan on orders_document_storage_created_at_date_index (cost=0.00..505.23 rows=8,106 width=0) (actual time=0.844..0.844 rows=7,302 loops=1)

  • Index Cond: ((created_at)::date > (('now'::cstring)::date - 5))
10. 6.472 6.472 ↓ 0.0 0 6,472

Index Scan using shopify_refunds_order_id_index on shopify_refunds r (cost=0.29..8.12 rows=1 width=908) (actual time=0.001..0.001 rows=0 loops=6,472)

  • Index Cond: (order_id = orders_document_storage.id)
  • Filter: ((created_at)::date > (('now'::cstring)::date - 5))
11. 0.129 0.129 ↑ 1.0 1 43

Index Scan using stores_pkey on stores (cost=0.14..2.41 rows=1 width=36) (actual time=0.003..0.003 rows=1 loops=43)

  • Index Cond: (orders_document_storage.store_id = id)
12. 0.645 0.645 ↑ 1.0 1 43

Index Scan using supplier_orders_shopify_store_order_id_index on supplier_orders_shopify (cost=0.42..8.45 rows=1 width=12) (actual time=0.015..0.015 rows=1 loops=43)

  • Index Cond: (orders_document_storage.id = store_order_id)
  • Filter: ((created_at)::date > (('now'::cstring)::date - 5))
13. 0.258 0.258 ↓ 0.0 0 43

Index Scan using supplier_orders_aliexpress_store_order_id_index on supplier_orders_aliexpress (cost=0.42..12.47 rows=1 width=16) (actual time=0.006..0.006 rows=0 loops=43)

  • Index Cond: (orders_document_storage.id = store_order_id)
  • Filter: ((created_at)::date > (('now'::cstring)::date - 5))
14. 26.211 879.393 ↓ 0.0 0 43

Hash Right Join (cost=2.25..111,030.03 rows=52,756 width=1,345) (actual time=2.290..20.451 rows=0 loops=43)

  • Hash Cond: ((products.id)::numeric = (((line_items.value -> 'line_item'::text) ->> 'product_id'::text))::numeric)
15. 853.010 853.010 ↑ 1.9 56,932 2

Seq Scan on products (cost=0.00..109,445.11 rows=105,511 width=1,321) (actual time=0.007..426.505 rows=56,932 loops=2)

16. 0.043 0.172 ↓ 0.0 0 43

Hash (cost=1.00..1.00 rows=100 width=32) (actual time=0.004..0.004 rows=0 loops=43)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
17. 0.129 0.129 ↓ 0.0 0 43

Function Scan on jsonb_array_elements line_items (cost=0.00..1.00 rows=100 width=32) (actual time=0.003..0.003 rows=0 loops=43)