explain.depesz.com

PostgreSQL's explain analyze made readable

Result: dsQN

Settings
# exclusive inclusive rows x rows loops node
1. 0.107 1,240.457 ↓ 1.5 12 1

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

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

Nested Loop Left Join (cost=7,580.98..7,746.09 rows=8 width=121,343) (actual time=1,239.856..1,240.350 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)) + CASE WHEN (o3_.visibility = 2) THEN (COALESCE(CASE WHEN (o1
3. 0.032 1,240.255 ↑ 1.8 12 1

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

4. 0.044 1,240.211 ↑ 1.8 12 1

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

5. 0.028 1,240.059 ↑ 1.8 12 1

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

6. 0.078 1,240.007 ↑ 3.8 12 1

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

7. 0.063 1,239.701 ↑ 3.8 12 1

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

  • Group Key: o4_.id
8. 0.017 1,239.638 ↑ 3.8 12 1

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

9. 1,239.621 1,239.621 ↑ 14.2 12 1

Index Scan using idx_oro_product_updated_at on oro_product o4_ (cost=0.42..28,799.43 rows=171 width=12) (actual time=388.495..1,239.621 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 (lower((sku)::text) ~~ '%2n-000zu5%'::text) OR (lower((sku)::text) ~~
  • Rows Removed by Filter: 142603
10. 0.228 0.228 ↑ 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.019..0.019 rows=1 loops=12)

  • Index Cond: (((status)::text = 'enabled'::text) AND (id = o4_.id))
  • Filter: ((inventory_status_id)::text = 'in_stock'::text)
11. 0.024 0.024 ↓ 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.002..0.002 rows=0 loops=12)

  • Index Cond: (product_id = o0_.id)
  • Heap Fetches: 0
12. 0.108 0.108 ↑ 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.009..0.009 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 : 9.610 ms
Execution time : 1,242.158 ms