explain.depesz.com

PostgreSQL's explain analyze made readable

Result: r2im

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 7,744.701 ↓ 0.0 0 1

Nested Loop (cost=1.26..3,739.72 rows=106 width=511) (actual time=7,744.701..7,744.701 rows=0 loops=1)

  • Output: subscription.id, subscription.unique_exchange_id, subscription.subscribe_id, subscription.card_id, subscription.user_id, subscription.franchise_user_id, subscription.begin_date, subscription.end_date, subscription.month_num, subscription.partner_organization_ueid, subscription.partner_code, subscription.subscription_type_id, subscription.buy_date, subscription_type.id, subscription_type.subscription_type_id, subscription_type.unique_exchange_id, subscription_type.name, subscription_type.name_for_user, subscription_type.type, subscription_type.paid, subscription_type.franchise, subscription_type.duo, subscription_type.public_subscription_type_number, subscription_type.involved_in_box_check, box.id, box.unique_exchange_id, box.name, box.reg_number, box.original_reg_number, box.user_id, box.nomenclature_ueid, box.franchise, box.franchise_user_id
  • Inner Unique: true
2. 3.711 7,744.701 ↓ 0.0 0 1

Nested Loop (cost=0.99..3,705.71 rows=106 width=302) (actual time=7,744.700..7,744.701 rows=0 loops=1)

  • Output: subscription.id, subscription.unique_exchange_id, subscription.subscribe_id, subscription.card_id, subscription.user_id, subscription.franchise_user_id, subscription.begin_date, subscription.end_date, subscription.month_num, subscription.partner_organization_ueid, subscription.partner_code, subscription.subscription_type_id, subscription.buy_date, box.id, box.unique_exchange_id, box.name, box.reg_number, box.original_reg_number, box.user_id, box.nomenclature_ueid, box.franchise, box.franchise_user_id
3. 5.994 5.994 ↓ 8.0 5,394 1

Index Scan using ix_subscription_partner_organization_ueid on public.subscription (cost=0.56..761.50 rows=677 width=137) (actual time=0.021..5.994 rows=5,394 loops=1)

  • Output: subscription.id, subscription.unique_exchange_id, subscription.subscribe_id, subscription.card_id, subscription.user_id, subscription.franchise_user_id, subscription.begin_date, subscription.end_date, subscription.month_num, subscription.partner_organization_ueid, subscription.partner_code, subscription.subscription_type_id, subscription.buy_date
  • Index Cond: ((subscription.partner_organization_ueid)::text = 'c2f7765c-a04c-4ace-9006-d13005b3a2c2'::text)
4. 7,734.996 7,734.996 ↓ 0.0 0 5,394

Index Scan using ix_box_fk_box_user_id on public.box (cost=0.43..4.34 rows=1 width=165) (actual time=1.434..1.434 rows=0 loops=5,394)

  • Output: box.id, box.unique_exchange_id, box.name, box.reg_number, box.original_reg_number, box.user_id, box.nomenclature_ueid, box.franchise, box.franchise_user_id
  • Index Cond: (box.user_id = subscription.user_id)
  • Filter: ((lower((box.original_reg_number)::text) ~~ 'kk%'::text) OR (lower((box.original_reg_number)::text) ~~ 'кк%'::text))
  • Rows Removed by Filter: 1845
5. 0.000 0.000 ↓ 0.0 0

Index Scan using subscription_type_pkey on public.subscription_type (cost=0.27..0.32 rows=1 width=209) (never executed)

  • Output: subscription_type.id, subscription_type.subscription_type_id, subscription_type.unique_exchange_id, subscription_type.name, subscription_type.name_for_user, subscription_type.type, subscription_type.paid, subscription_type.franchise, subscription_type.duo, subscription_type.public_subscription_type_number, subscription_type.involved_in_box_check
  • Index Cond: (subscription_type.id = subscription.subscription_type_id)
Planning time : 0.446 ms
Execution time : 7,744.743 ms