explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CuTE

Settings
# exclusive inclusive rows x rows loops node
1. 0.566 25,501.908 ↑ 23,667.5 2 1

Nested Loop (cost=508.80..132,146.66 rows=47,335 width=157) (actual time=1,239.786..25,501.908 rows=2 loops=1)

2. 0.114 4,344.095 ↓ 43.0 43 1

Nested Loop Left Join (cost=506.54..19,524.03 rows=1 width=960) (actual time=131.127..4,344.095 rows=43 loops=1)

3. 0.119 4,299.734 ↓ 43.0 43 1

Nested Loop Left Join (cost=506.12..19,511.55 rows=1 width=952) (actual time=130.493..4,299.734 rows=43 loops=1)

4. 0.179 4,262.764 ↓ 43.0 43 1

Nested Loop Left Join (cost=505.70..19,503.09 rows=1 width=948) (actual time=124.829..4,262.764 rows=43 loops=1)

5. 7.728 4,262.284 ↓ 43.0 43 1

Nested Loop (cost=505.55..19,500.67 rows=1 width=920) (actual time=124.811..4,262.284 rows=43 loops=1)

6. 4,099.882 4,106.206 ↓ 157.3 6,450 1

Bitmap Heap Scan on orders_document_storage (cost=505.26..19,167.14 rows=41 width=20) (actual time=9.149..4,106.206 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. 6.324 6.324 ↑ 1.1 7,186 1

Bitmap Index Scan on orders_document_storage_created_at_date_index (cost=0.00..505.25 rows=8,109 width=0) (actual time=6.324..6.324 rows=7,186 loops=1)

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

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

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

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

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

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

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

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

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

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

14. 0.086 0.688 ↓ 0.0 0 43

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

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

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

Planning time : 44.236 ms
Execution time : 25,502.484 ms