explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Zqiu

Settings
# exclusive inclusive rows x rows loops node
1. 0.476 5,285.582 ↑ 12,675.0 2 1

Nested Loop (cost=514.80..131,367.13 rows=25,350 width=157) (actual time=599.067..5,285.582 rows=2 loops=1)

2. 0.086 2,205.747 ↓ 43.0 43 1

Nested Loop Left Join (cost=512.55..20,707.34 rows=1 width=960) (actual time=109.743..2,205.747 rows=43 loops=1)

3. 0.111 2,175.776 ↓ 43.0 43 1

Nested Loop Left Join (cost=512.13..20,694.86 rows=1 width=952) (actual time=109.733..2,175.776 rows=43 loops=1)

4. 0.126 2,171.580 ↓ 43.0 43 1

Nested Loop Left Join (cost=511.70..20,686.40 rows=1 width=948) (actual time=109.714..2,171.580 rows=43 loops=1)

5. 50.788 2,171.196 ↓ 43.0 43 1

Nested Loop (cost=511.56..20,684.18 rows=1 width=920) (actual time=109.704..2,171.196 rows=43 loops=1)

6. 2,073.696 2,075.258 ↓ 143.3 6,450 1

Bitmap Heap Scan on orders_document_storage (cost=511.27..20,317.33 rows=45 width=20) (actual time=2.195..2,075.258 rows=6,450 loops=1)

  • Recheck Cond: ((created_at)::date > (('now'::cstring)::date - 5))
  • Filter: (((data -> 'data'::text) ->> 'cancelled_at'::text) IS NULL)
  • Rows Removed by Filter: 18
  • Heap Blocks: exact=2396
7. 1.562 1.562 ↑ 1.2 7,173 1

Bitmap Index Scan on orders_document_storage_created_at_date_index (cost=0.00..511.26 rows=8,910 width=0) (actual time=1.562..1.562 rows=7,173 loops=1)

  • Index Cond: ((created_at)::date > (('now'::cstring)::date - 5))
8. 45.150 45.150 ↓ 0.0 0 6,450

Index Scan using shopify_refunds_order_id_index on shopify_refunds r (cost=0.29..8.14 rows=1 width=908) (actual time=0.007..0.007 rows=0 loops=6,450)

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

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

  • Index Cond: (orders_document_storage.store_id = id)
10. 4.085 4.085 ↑ 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.094..0.095 rows=1 loops=43)

  • Index Cond: (orders_document_storage.id = store_order_id)
  • Filter: ((created_at)::date > (('now'::cstring)::date - 5))
11. 29.885 29.885 ↓ 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.695..0.695 rows=0 loops=43)

  • Index Cond: (orders_document_storage.id = store_order_id)
  • Filter: ((created_at)::date > (('now'::cstring)::date - 5))
12. 278.783 3,079.359 ↓ 0.0 0 43

Hash Right Join (cost=2.25..109,806.55 rows=28,286 width=1,342) (actual time=14.903..71.613 rows=0 loops=43)

  • Hash Cond: ((products.id)::numeric = (((line_items.value -> 'line_item'::text) ->> 'product_id'::text))::numeric)
13. 2,800.146 2,800.146 ↓ 1.0 56,932 2

Seq Scan on products (cost=0.00..108,955.72 rows=56,572 width=1,318) (actual time=0.007..1,400.073 rows=56,932 loops=2)

14. 0.086 0.430 ↓ 0.0 0 43

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

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

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