explain.depesz.com

PostgreSQL's explain analyze made readable

Result: agrp

Settings
# exclusive inclusive rows x rows loops node
1. 0.069 1,063.685 ↓ 1.5 12 1

Sort (cost=7,746.21..7,746.23 rows=8 width=121,343) (actual time=1,063.683..1,063.685 rows=12 loops=1)

  • Sort Key: o0_.updated_at DESC
  • Sort Method: quicksort Memory: 36kB
2. 0.050 1,063.616 ↓ 1.5 12 1

Nested Loop Left Join (cost=7,580.98..7,746.09 rows=8 width=121,343) (actual time=1,063.353..1,063.616 rows=12 loops=1)

  • Filter: (((COALESCE(CASE WHEN (o1_.visibility = 0) THEN 1 ELSE (o1_.visibility)::integer END, '-1'::integer) + (COALESCE(CASE WHEN (o2_.visibility = 0) THEN 1 ELSE (o2_.visibility)::integer END, 0) * 10
3. 0.017 1,063.554 ↑ 1.8 12 1

Nested Loop Left Join (cost=7,580.83..7,741.25 rows=22 width=121,347) (actual time=1,063.317..1,063.554 rows=12 loops=1)

4. 0.025 1,063.525 ↑ 1.8 12 1

Nested Loop Left Join (cost=7,580.68..7,737.23 rows=22 width=121,345) (actual time=1,063.307..1,063.525 rows=12 loops=1)

5. 0.023 1,063.428 ↑ 1.8 12 1

Nested Loop Anti Join (cost=7,580.24..7,711.70 rows=22 width=121,343) (actual time=1,063.283..1,063.428 rows=12 loops=1)

6. 0.046 1,063.393 ↑ 3.8 12 1

Nested Loop (cost=7,580.09..7,698.38 rows=45 width=121,343) (actual time=1,063.271..1,063.393 rows=12 loops=1)

7. 0.061 1,063.227 ↑ 3.8 12 1

HashAggregate (cost=7,579.67..7,580.12 rows=45 width=4) (actual time=1,063.222..1,063.227 rows=12 loops=1)

  • Group Key: o4_.id
8. 0.019 1,063.166 ↑ 3.8 12 1

Limit (cost=0.42..7,579.11 rows=45 width=12) (actual time=308.107..1,063.166 rows=12 loops=1)

9. 1,063.147 1,063.147 ↑ 14.2 12 1

Index Scan Backward using idx_oro_product_updated_at on oro_product o4_ (cost=0.42..28,799.43 rows=171 width=12) (actual time=308.106..1,063.147 rows=12 loops=1)

  • Filter: ((((lower((sku)::text) ~~ '%3a-001p9f%'::text) OR (lower((sku)::text) ~~ '%3a-001p8m%'::text)) AND (lower((sku)::text) ~~ '%41-001awh%'::text)) OR (lowe
  • Rows Removed by Filter: 142603
10. 0.120 0.120 ↑ 1.0 1 12

Index Scan using idx_oro_product_status_id_organization on oro_product o0_ (cost=0.42..2.62 rows=1 width=121,343) (actual time=0.009..0.010 rows=1 loops=12)

  • Index Cond: (((status)::text = 'enabled'::text) AND (id = o4_.id))
  • Filter: ((inventory_status_id)::text = 'in_stock'::text)
11. 0.012 0.012 ↓ 0.0 0 12

Index Only Scan using idx_456b4ade4584665a on oro_product_variant_link o5_ (cost=0.15..0.33 rows=10 width=4) (actual time=0.001..0.001 rows=0 loops=12)

  • Index Cond: (product_id = o0_.id)
  • Heap Fetches: 0
12. 0.072 0.072 ↑ 1.0 1 12

Index Scan using oro_prod_vsb_resolv_pkey on oro_prod_vsb_resolv o1_ (cost=0.43..1.15 rows=1 width=6) (actual time=0.006..0.006 rows=1 loops=12)

  • Index Cond: ((scope_id = 2) AND (o0_.id = product_id))
13. 0.012 0.012 ↓ 0.0 0 12

Index Scan using oro_cus_grp_prod_vsb_resolv_pkey on oro_cus_grp_prod_vsb_resolv o2_ (cost=0.15..0.17 rows=1 width=6) (actual time=0.001..0.001 rows=0 loops=12)

  • Index Cond: ((scope_id = 89) AND (o0_.id = product_id))
14. 0.012 0.012 ↓ 0.0 0 12

Index Scan using oro_cus_prod_vsb_resolv_pkey on oro_cus_prod_vsb_resolv o3_ (cost=0.15..0.17 rows=1 width=6) (actual time=0.001..0.001 rows=0 loops=12)

  • Index Cond: ((scope_id = 2) AND (o0_.id = product_id))
Planning time : 7.117 ms
Execution time : 1,064.640 ms