explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qVlG

Settings
# exclusive inclusive rows x rows loops node
1. 0.951 52.091 ↓ 1.5 287 1

Sort (cost=97.29..97.76 rows=190 width=1,743) (actual time=52.024..52.091 rows=287 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.is_stocked, 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, product_1.state_reason
  • Sort Key: tag.name
  • Sort Method: quicksort Memory: 625kB
  • Buffers: shared hit=901
2. 47.989 51.140 ↓ 1.5 287 1

Nested Loop Left Join (cost=49.08..90.10 rows=190 width=1,743) (actual time=0.729..51.140 rows=287 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.is_stocked, 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, product_1.state_reason
  • Buffers: shared hit=901
3. 0.022 0.049 ↑ 1.5 2 1

Hash Join (cost=8.95..10.65 rows=3 width=104) (actual time=0.032..0.049 rows=2 loops=1)

  • Output: tag.id, tag.tag_type, tag.code, tag.name
  • Hash Cond: (tag.id = product_tag.tag_id)
  • Buffers: shared hit=4
4. 0.010 0.010 ↑ 1.0 41 1

Seq Scan on public.tag (cost=0.00..1.41 rows=41 width=104) (actual time=0.005..0.010 rows=41 loops=1)

  • Output: tag.id, tag.tag_type, tag.code, tag.name
  • Buffers: shared hit=1
5. 0.005 0.017 ↑ 1.5 2 1

Hash (cost=8.91..8.91 rows=3 width=8) (actual time=0.016..0.017 rows=2 loops=1)

  • Output: product_tag.tag_id
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=3
6. 0.012 0.012 ↑ 1.5 2 1

Index Scan using ix_product_tag_product_id on public.product_tag (cost=0.28..8.91 rows=3 width=8) (actual time=0.011..0.012 rows=2 loops=1)

  • Output: product_tag.tag_id
  • Index Cond: (10 = product_tag.product_id)
  • Buffers: shared hit=3
7. 0.192 3.102 ↓ 2.3 144 2

Hash Left Join (cost=40.13..52.61 rows=63 width=1,647) (actual time=1.053..1.551 rows=144 loops=2)

  • 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, product_1.state_reason, 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.is_stocked, 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
  • Inner Unique: true
  • Hash Cond: (product_1.data_processor_id = data_processor_1.id)
  • Buffers: shared hit=897
8. 0.708 2.878 ↓ 2.3 144 2

Hash Right Join (cost=38.14..50.44 rows=63 width=1,574) (actual time=1.030..1.439 rows=144 loops=2)

  • 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, product_1.state_reason, 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.is_stocked, brand_1.timezone, brand_1.mfa_challenge_frequency, brand_1.order_created_notification_email_address
  • Hash Cond: (brand_1.id = product_1.brand_id)
  • Buffers: shared hit=896
9. 0.136 0.136 ↑ 1.0 378 2

Seq Scan on public.brand brand_1 (cost=0.00..9.78 rows=378 width=100) (actual time=0.005..0.068 rows=378 loops=2)

  • Output: brand_1.id, brand_1.created_at, brand_1.code, brand_1.name, brand_1.enabled, brand_1.statement_reference, brand_1.category, brand_1.blocked_verticals, brand_1.locale, brand_1.updated_at, brand_1.timezone, brand_1.mfa_challenge_frequency, brand_1.order_created_notification_email_address, brand_1.is_stocked
  • Buffers: shared hit=12
10. 0.628 2.034 ↓ 2.3 144 2

Hash (cost=37.35..37.35 rows=63 width=1,474) (actual time=1.017..1.017 rows=144 loops=2)

  • 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, product_1.state_reason
  • Buckets: 1,024 Batches: 1 Memory Usage: 295kB
  • Buffers: shared hit=884
11. 0.672 1.406 ↓ 2.3 144 2

Nested Loop (cost=0.56..37.35 rows=63 width=1,474) (actual time=0.028..0.703 rows=144 loops=2)

  • 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, product_1.state_reason
  • Inner Unique: true
  • Buffers: shared hit=884
12. 0.160 0.160 ↓ 2.3 144 2

Index Scan using ix_product_tag_tag_id on public.product_tag product_tag_1 (cost=0.28..3.82 rows=63 width=16) (actual time=0.018..0.080 rows=144 loops=2)

  • Output: product_tag_1.product_id, product_tag_1.tag_id
  • Index Cond: (tag.id = product_tag_1.tag_id)
  • Buffers: shared hit=23
13. 0.574 0.574 ↑ 1.0 1 287

Index Scan using product_pkey on public.product product_1 (cost=0.28..0.53 rows=1 width=1,466) (actual time=0.002..0.002 rows=1 loops=287)

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

Hash (cost=1.44..1.44 rows=44 width=73) (actual time=0.032..0.032 rows=44 loops=1)

  • Output: data_processor_1.id, data_processor_1.code, data_processor_1.name, data_processor_1.enabled
  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=1
15. 0.010 0.010 ↑ 1.0 44 1

Seq Scan on public.data_processor data_processor_1 (cost=0.00..1.44 rows=44 width=73) (actual time=0.004..0.010 rows=44 loops=1)

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