explain.depesz.com

PostgreSQL's explain analyze made readable

Result: J3mb

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 1.192 52.384 ↓ 2.1 357 1

Sort (cost=314.19..314.62 rows=171 width=1,730) (actual time=52.294..52.384 rows=357 loops=1)

  • Output: tag.id, tag.tag_type, tag.code, tag.name, brand_1.id, brand_1.created_at, brand_1.updated_at, brand_1.code, brand_1.name, brand_1.enabled, brand_1.statement_reference, brand_1.category, brand_1.locale, brand_1.timezone, brand_1.mfa_challenge_frequency, brand_1.order_created_notification_email_address, data_processor_1.id, data_processor_1.code, data_processor_1.name, data_processor_1.enabled, product_1.created_at, product_1.updated_at, product_1.id, product_1.parent_id, product_1.code, product_1.name, product_1.state, product_1.product_type, product_1.is_enabled_by_default, product_1.brand_id, product_1.data_processor_id, product_1.currency, product_1.locale, product_1.has_face_value, product_1.base_cost_multiplier, product_1.base_price_multiplier, product_1.availability, product_1.ignore_api_stock_reserve_thresholds, product_1.stocked_delivery_estimate, product_1.denomination_type, product_1.minimum_value, product_1.maximum_value, product_1.available_denominations, product_1.e_code_type, product_1.e_code_pin_source, product_1.e_code_usage_type, product_1.e_code_retention_policy, product_1.code_format_pattern, product_1.public_name, product_1.egift_name, product_1.description, product_1.primary_colour, product_1.redeemable_at, product_1.enable_digital_wrapping, product_1.barcode_format, product_1.barcode_format_string, product_1.terms_consumer, product_1.terms_buyer, product_1.redeem_markdown, product_1.refund_policy_markdown, product_1.reissuance_policy_markdown, product_1.product_url, product_1.brand_url, product_1.customer_service_url, product_1.customer_service_phone, product_1.balance_check_url, product_1.expiry_in_months, product_1.expiry_mode, product_1.show_absolute_expiry, product_1.show_discount, product_1.direct_terms_enabled, product_1.code_length, product_1.pin_length, product_1.billing_model
  • Sort Key: tag.name
  • Sort Method: quicksort Memory: 806kB
  • Buffers: shared hit=205
2. 0.245 51.192 ↓ 2.1 357 1

Hash Left Join (cost=249.98..307.85 rows=171 width=1,730) (actual time=34.225..51.192 rows=357 loops=1)

  • Output: tag.id, tag.tag_type, tag.code, tag.name, brand_1.id, brand_1.created_at, brand_1.updated_at, brand_1.code, brand_1.name, brand_1.enabled, brand_1.statement_reference, brand_1.category, brand_1.locale, brand_1.timezone, brand_1.mfa_challenge_frequency, brand_1.order_created_notification_email_address, data_processor_1.id, data_processor_1.code, data_processor_1.name, data_processor_1.enabled, product_1.created_at, product_1.updated_at, product_1.id, product_1.parent_id, product_1.code, product_1.name, product_1.state, product_1.product_type, product_1.is_enabled_by_default, product_1.brand_id, product_1.data_processor_id, product_1.currency, product_1.locale, product_1.has_face_value, product_1.base_cost_multiplier, product_1.base_price_multiplier, product_1.availability, product_1.ignore_api_stock_reserve_thresholds, product_1.stocked_delivery_estimate, product_1.denomination_type, product_1.minimum_value, product_1.maximum_value, product_1.available_denominations, product_1.e_code_type, product_1.e_code_pin_source, product_1.e_code_usage_type, product_1.e_code_retention_policy, product_1.code_format_pattern, product_1.public_name, product_1.egift_name, product_1.description, product_1.primary_colour, product_1.redeemable_at, product_1.enable_digital_wrapping, product_1.barcode_format, product_1.barcode_format_string, product_1.terms_consumer, product_1.terms_buyer, product_1.redeem_markdown, product_1.refund_policy_markdown, product_1.reissuance_policy_markdown, product_1.product_url, product_1.brand_url, product_1.customer_service_url, product_1.customer_service_phone, product_1.balance_check_url, product_1.expiry_in_months, product_1.expiry_mode, product_1.show_absolute_expiry, product_1.show_discount, product_1.direct_terms_enabled, product_1.code_length, product_1.pin_length, product_1.billing_model
  • Inner Unique: true
  • Hash Cond: (product_1.data_processor_id = data_processor_1.id)
  • Buffers: shared hit=205
3. 0.287 50.928 ↓ 2.1 357 1

Hash Left Join (cost=248.15..305.52 rows=171 width=1,657) (actual time=34.199..50.928 rows=357 loops=1)

  • Output: tag.id, tag.tag_type, tag.code, tag.name, product_1.created_at, product_1.updated_at, product_1.id, product_1.parent_id, product_1.code, product_1.name, product_1.state, product_1.product_type, product_1.is_enabled_by_default, product_1.brand_id, product_1.data_processor_id, product_1.currency, product_1.locale, product_1.has_face_value, product_1.base_cost_multiplier, product_1.base_price_multiplier, product_1.availability, product_1.ignore_api_stock_reserve_thresholds, product_1.stocked_delivery_estimate, product_1.denomination_type, product_1.minimum_value, product_1.maximum_value, product_1.available_denominations, product_1.e_code_type, product_1.e_code_pin_source, product_1.e_code_usage_type, product_1.e_code_retention_policy, product_1.code_format_pattern, product_1.public_name, product_1.egift_name, product_1.description, product_1.primary_colour, product_1.redeemable_at, product_1.enable_digital_wrapping, product_1.barcode_format, product_1.barcode_format_string, product_1.terms_consumer, product_1.terms_buyer, product_1.redeem_markdown, product_1.refund_policy_markdown, product_1.reissuance_policy_markdown, product_1.product_url, product_1.brand_url, product_1.customer_service_url, product_1.customer_service_phone, product_1.balance_check_url, product_1.expiry_in_months, product_1.expiry_mode, product_1.show_absolute_expiry, product_1.show_discount, product_1.direct_terms_enabled, product_1.code_length, product_1.pin_length, product_1.billing_model, brand_1.id, brand_1.created_at, brand_1.updated_at, brand_1.code, brand_1.name, brand_1.enabled, brand_1.statement_reference, brand_1.category, brand_1.locale, brand_1.timezone, brand_1.mfa_challenge_frequency, brand_1.order_created_notification_email_address
  • Inner Unique: true
  • Hash Cond: (product_1.brand_id = brand_1.id)
  • Buffers: shared hit=204
4. 0.508 50.351 ↓ 2.1 357 1

Hash Right Join (cost=235.09..292.02 rows=171 width=1,558) (actual time=33.897..50.351 rows=357 loops=1)

  • Output: tag.id, tag.tag_type, tag.code, tag.name, product_1.created_at, product_1.updated_at, product_1.id, product_1.parent_id, product_1.code, product_1.name, product_1.state, product_1.product_type, product_1.is_enabled_by_default, product_1.brand_id, product_1.data_processor_id, product_1.currency, product_1.locale, product_1.has_face_value, product_1.base_cost_multiplier, product_1.base_price_multiplier, product_1.availability, product_1.ignore_api_stock_reserve_thresholds, product_1.stocked_delivery_estimate, product_1.denomination_type, product_1.minimum_value, product_1.maximum_value, product_1.available_denominations, product_1.e_code_type, product_1.e_code_pin_source, product_1.e_code_usage_type, product_1.e_code_retention_policy, product_1.code_format_pattern, product_1.public_name, product_1.egift_name, product_1.description, product_1.primary_colour, product_1.redeemable_at, product_1.enable_digital_wrapping, product_1.barcode_format, product_1.barcode_format_string, product_1.terms_consumer, product_1.terms_buyer, product_1.redeem_markdown, product_1.refund_policy_markdown, product_1.reissuance_policy_markdown, product_1.product_url, product_1.brand_url, product_1.customer_service_url, product_1.customer_service_phone, product_1.balance_check_url, product_1.expiry_in_months, product_1.expiry_mode, product_1.show_absolute_expiry, product_1.show_discount, product_1.direct_terms_enabled, product_1.code_length, product_1.pin_length, product_1.billing_model
  • Hash Cond: (product_tag_1.tag_id = tag.id)
  • Buffers: shared hit=199
5. 15.642 49.518 ↑ 1.0 2,458 1

Hash Join (cost=187.62..233.40 rows=2,515 width=1,462) (actual time=33.565..49.518 rows=2,458 loops=1)

  • Output: product_tag_1.tag_id, product_1.created_at, product_1.updated_at, product_1.id, product_1.parent_id, product_1.code, product_1.name, product_1.state, product_1.product_type, product_1.is_enabled_by_default, product_1.brand_id, product_1.data_processor_id, product_1.currency, product_1.locale, product_1.has_face_value, product_1.base_cost_multiplier, product_1.base_price_multiplier, product_1.availability, product_1.ignore_api_stock_reserve_thresholds, product_1.stocked_delivery_estimate, product_1.denomination_type, product_1.minimum_value, product_1.maximum_value, product_1.available_denominations, product_1.e_code_type, product_1.e_code_pin_source, product_1.e_code_usage_type, product_1.e_code_retention_policy, product_1.code_format_pattern, product_1.public_name, product_1.egift_name, product_1.description, product_1.primary_colour, product_1.redeemable_at, product_1.enable_digital_wrapping, product_1.barcode_format, product_1.barcode_format_string, product_1.terms_consumer, product_1.terms_buyer, product_1.redeem_markdown, product_1.refund_policy_markdown, product_1.reissuance_policy_markdown, product_1.product_url, product_1.brand_url, product_1.customer_service_url, product_1.customer_service_phone, product_1.balance_check_url, product_1.expiry_in_months, product_1.expiry_mode, product_1.show_absolute_expiry, product_1.show_discount, product_1.direct_terms_enabled, product_1.code_length, product_1.pin_length, product_1.billing_model
  • Inner Unique: true
  • Hash Cond: (product_tag_1.product_id = product_1.id)
  • Buffers: shared hit=184
6. 0.322 0.322 ↑ 1.0 2,458 1

Seq Scan on public.product_tag product_tag_1 (cost=0.00..39.15 rows=2,515 width=16) (actual time=0.004..0.322 rows=2,458 loops=1)

  • Output: product_tag_1.product_id, product_tag_1.tag_id
  • Buffers: shared hit=14
7. 1.844 33.554 ↑ 1.0 755 1

Hash (cost=177.83..177.83 rows=783 width=1,454) (actual time=33.554..33.554 rows=755 loops=1)

  • Output: product_1.created_at, product_1.updated_at, product_1.id, product_1.parent_id, product_1.code, product_1.name, product_1.state, product_1.product_type, product_1.is_enabled_by_default, product_1.brand_id, product_1.data_processor_id, product_1.currency, product_1.locale, product_1.has_face_value, product_1.base_cost_multiplier, product_1.base_price_multiplier, product_1.availability, product_1.ignore_api_stock_reserve_thresholds, product_1.stocked_delivery_estimate, product_1.denomination_type, product_1.minimum_value, product_1.maximum_value, product_1.available_denominations, product_1.e_code_type, product_1.e_code_pin_source, product_1.e_code_usage_type, product_1.e_code_retention_policy, product_1.code_format_pattern, product_1.public_name, product_1.egift_name, product_1.description, product_1.primary_colour, product_1.redeemable_at, product_1.enable_digital_wrapping, product_1.barcode_format, product_1.barcode_format_string, product_1.terms_consumer, product_1.terms_buyer, product_1.redeem_markdown, product_1.refund_policy_markdown, product_1.reissuance_policy_markdown, product_1.product_url, product_1.brand_url, product_1.customer_service_url, product_1.customer_service_phone, product_1.balance_check_url, product_1.expiry_in_months, product_1.expiry_mode, product_1.show_absolute_expiry, product_1.show_discount, product_1.direct_terms_enabled, product_1.code_length, product_1.pin_length, product_1.billing_model
  • Buckets: 1024 Batches: 1 Memory Usage: 1092kB
  • Buffers: shared hit=170
8. 31.710 31.710 ↑ 1.0 755 1

Seq Scan on public.product product_1 (cost=0.00..177.83 rows=783 width=1,454) (actual time=0.004..31.710 rows=755 loops=1)

  • Output: product_1.created_at, product_1.updated_at, product_1.id, product_1.parent_id, product_1.code, product_1.name, product_1.state, product_1.product_type, product_1.is_enabled_by_default, product_1.brand_id, product_1.data_processor_id, product_1.currency, product_1.locale, product_1.has_face_value, product_1.base_cost_multiplier, product_1.base_price_multiplier, product_1.availability, product_1.ignore_api_stock_reserve_thresholds, product_1.stocked_delivery_estimate, product_1.denomination_type, product_1.minimum_value, product_1.maximum_value, product_1.available_denominations, product_1.e_code_type, product_1.e_code_pin_source, product_1.e_code_usage_type, product_1.e_code_retention_policy, product_1.code_format_pattern, product_1.public_name, product_1.egift_name, product_1.description, product_1.primary_colour, product_1.redeemable_at, product_1.enable_digital_wrapping, product_1.barcode_format, product_1.barcode_format_string, product_1.terms_consumer, product_1.terms_buyer, product_1.redeem_markdown, product_1.refund_policy_markdown, product_1.reissuance_policy_markdown, product_1.product_url, product_1.brand_url, product_1.customer_service_url, product_1.customer_service_phone, product_1.balance_check_url, product_1.expiry_in_months, product_1.expiry_mode, product_1.show_absolute_expiry, product_1.show_discount, product_1.direct_terms_enabled, product_1.code_length, product_1.pin_length, product_1.billing_model
  • Buffers: shared hit=170
9. 0.003 0.325 ↑ 1.0 3 1

Hash (cost=47.44..47.44 rows=3 width=104) (actual time=0.325..0.325 rows=3 loops=1)

  • Output: tag.id, tag.tag_type, tag.code, tag.name
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=15
10. 0.007 0.322 ↑ 1.0 3 1

Hash Join (cost=1.99..47.44 rows=3 width=104) (actual time=0.041..0.322 rows=3 loops=1)

  • Output: tag.id, tag.tag_type, tag.code, tag.name
  • Inner Unique: true
  • Hash Cond: (product_tag.tag_id = tag.id)
  • Buffers: shared hit=15
11. 0.291 0.291 ↑ 1.0 3 1

Seq Scan on public.product_tag (cost=0.00..45.44 rows=3 width=8) (actual time=0.012..0.291 rows=3 loops=1)

  • Output: product_tag.product_id, product_tag.tag_id
  • Filter: (9 = product_tag.product_id)
  • Rows Removed by Filter: 2455
  • Buffers: shared hit=14
12. 0.015 0.024 ↑ 1.1 41 1

Hash (cost=1.44..1.44 rows=44 width=104) (actual time=0.024..0.024 rows=41 loops=1)

  • Output: tag.id, tag.tag_type, tag.code, tag.name
  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=1
13. 0.009 0.009 ↑ 1.1 41 1

Seq Scan on public.tag (cost=0.00..1.44 rows=44 width=104) (actual time=0.004..0.009 rows=41 loops=1)

  • Output: tag.id, tag.tag_type, tag.code, tag.name
  • Buffers: shared hit=1
14. 0.170 0.290 ↓ 1.0 363 1

Hash (cost=8.58..8.58 rows=358 width=99) (actual time=0.290..0.290 rows=363 loops=1)

  • Output: brand_1.id, brand_1.created_at, brand_1.updated_at, brand_1.code, brand_1.name, brand_1.enabled, brand_1.statement_reference, brand_1.category, brand_1.locale, brand_1.timezone, brand_1.mfa_challenge_frequency, brand_1.order_created_notification_email_address
  • Buckets: 1024 Batches: 1 Memory Usage: 48kB
  • Buffers: shared hit=5
15. 0.120 0.120 ↓ 1.0 363 1

Seq Scan on public.brand brand_1 (cost=0.00..8.58 rows=358 width=99) (actual time=0.007..0.120 rows=363 loops=1)

  • Output: brand_1.id, brand_1.created_at, brand_1.updated_at, brand_1.code, brand_1.name, brand_1.enabled, brand_1.statement_reference, brand_1.category, brand_1.locale, brand_1.timezone, brand_1.mfa_challenge_frequency, brand_1.order_created_notification_email_address
  • Buffers: shared hit=5
16. 0.012 0.019 ↓ 1.1 40 1

Hash (cost=1.37..1.37 rows=37 width=73) (actual time=0.019..0.019 rows=40 loops=1)

  • Output: data_processor_1.id, data_processor_1.code, data_processor_1.name, data_processor_1.enabled
  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=1
17. 0.007 0.007 ↓ 1.1 40 1

Seq Scan on public.data_processor data_processor_1 (cost=0.00..1.37 rows=37 width=73) (actual time=0.003..0.007 rows=40 loops=1)

  • Output: data_processor_1.id, data_processor_1.code, data_processor_1.name, data_processor_1.enabled
  • Buffers: shared hit=1