explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ql1m

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 4.253 ↓ 0.0 0 1

Nested Loop (cost=1.99..28.84 rows=1 width=3,946) (actual time=4.253..4.253 rows=0 loops=1)

  • Planning time: 2.309 ms
  • Execution time: 4.507 ms
2. 0.170 4.253 ↓ 0.0 0 1

Nested Loop (cost=1.57..28.17 rows=1 width=2,430) (actual time=4.253..4.253 rows=0 loops=1)

  • Join Filter: (((subscriptions.created_at + (((personal_offers.params #>> '{subscription,duration}'::text[]) || ' days'::text))::interval))::date <= ((now() + '1 day'::interval))::date)
  • Rows Removed by Join Filter: 71
3. 0.080 3.621 ↓ 77.0 77 1

Nested Loop (cost=1.14..27.50 rows=1 width=2,264) (actual time=0.073..3.621 rows=77 loops=1)

4. 1.127 2.925 ↓ 77.0 77 1

Nested Loop (cost=0.57..26.72 rows=1 width=1,985) (actual time=0.062..2.925 rows=77 loops=1)

  • Join Filter: ((orders.meta -> 'personal_offer_id'::text) = to_jsonb(personal_offers.id))
  • Rows Removed by Join Filter: 770
5. 0.120 0.720 ↓ 77.0 77 1

Nested Loop (cost=0.57..25.75 rows=1 width=619) (actual time=0.026..0.720 rows=77 loops=1)

6. 0.215 0.215 ↓ 77.0 77 1

Index Scan using household_packages_id_partial on household_packages (cost=0.14..25.07 rows=1 width=87) (actual time=0.015..0.215 rows=77 loops=1)

  • Filter: (((status)::text <> 'archived'::text) AND ((ownership_type)::text = 'subsn'::text) AND ((expires_at > timezone('utc'::text, now())) OR (expires_at IS NULL)))
  • Rows Removed by Filter: 22
7. 0.385 0.385 ↑ 1.0 1 77

Index Scan using orders_household_package_id_idx on orders (cost=0.43..0.67 rows=1 width=532) (actual time=0.005..0.005 rows=1 loops=77)

  • Index Cond: (household_package_id = household_packages.id)
8. 1.078 1.078 ↑ 1.2 11 77

Seq Scan on personal_offers (cost=0.00..0.74 rows=13 width=1,366) (actual time=0.002..0.014 rows=11 loops=77)

  • Filter: (((params #>> '{subscription,duration}'::text[]) IS NOT NULL) AND (mechanics = 'subscription'::text))
  • Rows Removed by Filter: 5
9. 0.616 0.616 ↑ 1.0 1 77

Index Scan using households_pkey on households (cost=0.57..0.78 rows=1 width=279) (actual time=0.008..0.008 rows=1 loops=77)

  • Index Cond: (id = orders.household_id)
10. 0.462 0.462 ↑ 1.0 1 77

Index Scan using subscriptions_order_id_idx on subscriptions (cost=0.43..0.64 rows=1 width=166) (actual time=0.005..0.006 rows=1 loops=77)

  • Index Cond: (order_id = orders.id)
  • Filter: ((status)::text = ANY ('{suspended,active}'::text[]))
  • Rows Removed by Filter: 0
11. 0.000 0.000 ↓ 0.0 0

Index Scan using packages_pkey on packages (cost=0.42..0.66 rows=1 width=1,516) (never executed)

  • Index Cond: ((id)::text = (household_packages.package_id)::text)