explain.depesz.com

PostgreSQL's explain analyze made readable

Result: d6Ey

Settings
# exclusive inclusive rows x rows loops node
1. 0.106 14.776 ↓ 5.7 68 1

Unique (cost=10,970.97..10,971.57 rows=12 width=401) (actual time=14.665..14.776 rows=68 loops=1)

  • Output: product.legacy_cod, item.catalog_item_id, product.product_name, item.owner_id, product.product_description, class_card.category_id, class_card.legacy_cod, class_card.category_name, (COALESCE((CASE WHEN (count(1) > 0) THEN array_remove(ARRAY[CASE bool_or(availability_configuration_1.include_sunday) WHEN CASE_TEST_EXPR THEN 0 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_monday) WHEN CASE_TEST_EXPR THEN 1 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_tuesday) WHEN CASE_TEST_EXPR THEN 2 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_wednesday) WHEN CASE_TEST_EXPR THEN 3 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_thursday) WHEN CASE_TEST_EXPR THEN 4 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_friday) WHEN CASE_TEST_EXPR THEN 5 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_saturday) WHEN CASE_TEST_EXPR THEN 6 ELSE NULL::integer END], NULL::integer) ELSE NULL::integer[] END), (array_remove(ARRAY[CASE bool_or(availability_configuration.include_sunday) WHEN CASE_TEST_EXPR THEN 0 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_monday) WHEN CASE_TEST_EXPR THEN 1 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_tuesday) WHEN CASE_TEST_EXPR THEN 2 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_wednesday) WHEN CASE_TEST_EXPR THEN 3 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_thursday) WHEN CASE_TEST_EXPR THEN 4 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_friday) WHEN CASE_TEST_EXPR THEN 5 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_saturday) WHEN CASE_TEST_EXPR THEN 6 ELSE NULL::integer END], NULL::integer)), '{0,1,2,3,4,5,6}'::integer[])), ((((array_agg("substring"((legacy_config.chave)::text, 6))) || (array_agg("substring"((legacy_config_1.chave)::text, 6)))) || CASE WHEN (item.promotion_status = 'S'::bpchar) THEN '{MKT::HIGHLIGHT}'::text[] ELSE '{}'::text[] END)), (sum(cg.min_group_price)), ((product.product_photo)::text), rp1.promo_original_price, rp1.run_price, (COALESCE((CASE WHEN (count(1) > 0) THEN array_agg((times_1_1.times)::time without time zone) ELSE NULL::time without time zone[] END), (array_agg((times_1.times)::time without time zone)))), (((setweight(to_tsvector('portuguese'::regconfig, (product.product_name)::text), 'A'::"char") || setweight(to_tsvector('portuguese'::regconfig, (COALESCE(product.product_description, ''::character varying))::text), 'B'::"char")) || setweight(to_tsvector('portuguese'::regconfig, (COALESCE(class_card.category_name, ''::character varying))::text), 'C'::"char"))), (r.path[1]), (r.path[2]), catalog.catalog_group
  • Buffers: shared hit=5450
2. 0.230 14.670 ↓ 5.7 68 1

Sort (cost=10,970.97..10,971.00 rows=12 width=401) (actual time=14.664..14.670 rows=68 loops=1)

  • Output: product.legacy_cod, item.catalog_item_id, product.product_name, item.owner_id, product.product_description, class_card.category_id, class_card.legacy_cod, class_card.category_name, (COALESCE((CASE WHEN (count(1) > 0) THEN array_remove(ARRAY[CASE bool_or(availability_configuration_1.include_sunday) WHEN CASE_TEST_EXPR THEN 0 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_monday) WHEN CASE_TEST_EXPR THEN 1 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_tuesday) WHEN CASE_TEST_EXPR THEN 2 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_wednesday) WHEN CASE_TEST_EXPR THEN 3 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_thursday) WHEN CASE_TEST_EXPR THEN 4 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_friday) WHEN CASE_TEST_EXPR THEN 5 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_saturday) WHEN CASE_TEST_EXPR THEN 6 ELSE NULL::integer END], NULL::integer) ELSE NULL::integer[] END), (array_remove(ARRAY[CASE bool_or(availability_configuration.include_sunday) WHEN CASE_TEST_EXPR THEN 0 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_monday) WHEN CASE_TEST_EXPR THEN 1 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_tuesday) WHEN CASE_TEST_EXPR THEN 2 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_wednesday) WHEN CASE_TEST_EXPR THEN 3 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_thursday) WHEN CASE_TEST_EXPR THEN 4 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_friday) WHEN CASE_TEST_EXPR THEN 5 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_saturday) WHEN CASE_TEST_EXPR THEN 6 ELSE NULL::integer END], NULL::integer)), '{0,1,2,3,4,5,6}'::integer[])), ((((array_agg("substring"((legacy_config.chave)::text, 6))) || (array_agg("substring"((legacy_config_1.chave)::text, 6)))) || CASE WHEN (item.promotion_status = 'S'::bpchar) THEN '{MKT::HIGHLIGHT}'::text[] ELSE '{}'::text[] END)), (sum(cg.min_group_price)), ((product.product_photo)::text), rp1.promo_original_price, rp1.run_price, (COALESCE((CASE WHEN (count(1) > 0) THEN array_agg((times_1_1.times)::time without time zone) ELSE NULL::time without time zone[] END), (array_agg((times_1.times)::time without time zone)))), (((setweight(to_tsvector('portuguese'::regconfig, (product.product_name)::text), 'A'::"char") || setweight(to_tsvector('portuguese'::regconfig, (COALESCE(product.product_description, ''::character varying))::text), 'B'::"char")) || setweight(to_tsvector('portuguese'::regconfig, (COALESCE(class_card.category_name, ''::character varying))::text), 'C'::"char"))), (r.path[1]), (r.path[2]), catalog.catalog_group
  • Sort Key: product.legacy_cod, item.catalog_item_id, product.product_name, item.owner_id, product.product_description, class_card.category_id, class_card.legacy_cod, class_card.category_name, (COALESCE((CASE WHEN (count(1) > 0) THEN array_remove(ARRAY[CASE bool_or(availability_configuration_1.include_sunday) WHEN CASE_TEST_EXPR THEN 0 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_monday) WHEN CASE_TEST_EXPR THEN 1 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_tuesday) WHEN CASE_TEST_EXPR THEN 2 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_wednesday) WHEN CASE_TEST_EXPR THEN 3 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_thursday) WHEN CASE_TEST_EXPR THEN 4 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_friday) WHEN CASE_TEST_EXPR THEN 5 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_saturday) WHEN CASE_TEST_EXPR THEN 6 ELSE NULL::integer END], NULL::integer) ELSE NULL::integer[] END), (array_remove(ARRAY[CASE bool_or(availability_configuration.include_sunday) WHEN CASE_TEST_EXPR THEN 0 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_monday) WHEN CASE_TEST_EXPR THEN 1 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_tuesday) WHEN CASE_TEST_EXPR THEN 2 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_wednesday) WHEN CASE_TEST_EXPR THEN 3 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_thursday) WHEN CASE_TEST_EXPR THEN 4 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_friday) WHEN CASE_TEST_EXPR THEN 5 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_saturday) WHEN CASE_TEST_EXPR THEN 6 ELSE NULL::integer END], NULL::integer)), '{0,1,2,3,4,5,6}'::integer[])), ((((array_agg("substring"((legacy_config.chave)::text, 6))) || (array_agg("substring"((legacy_config_1.chave)::text, 6)))) || CASE WHEN (item.promotion_status = 'S'::bpchar) THEN '{MKT::HIGHLIGHT}'::text[] ELSE '{}'::text[] END)), (sum(cg.min_group_price)), ((product.product_photo)::text), rp1.promo_original_price, rp1.run_price, (COALESCE((CASE WHEN (count(1) > 0) THEN array_agg((times_1_1.times)::time without time zone) ELSE NULL::time without time zone[] END), (array_agg((times_1.times)::time without time zone)))), (((setweight(to_tsvector('portuguese'::regconfig, (product.product_name)::text), 'A'::"char") || setweight(to_tsvector('portuguese'::regconfig, (COALESCE(product.product_description, ''::character varying))::text), 'B'::"char")) || setweight(to_tsvector('portuguese'::regconfig, (COALESCE(class_card.category_name, ''::character varying))::text), 'C'::"char"))), (r.path[1]), (r.path[2]), catalog.catalog_group
  • Sort Method: quicksort Memory: 162kB
  • Buffers: shared hit=5450
3. 0.863 14.440 ↓ 5.7 68 1

Nested Loop (cost=1,837.91..10,970.75 rows=12 width=401) (actual time=1.576..14.440 rows=68 loops=1)

  • Output: product.legacy_cod, item.catalog_item_id, product.product_name, item.owner_id, product.product_description, class_card.category_id, class_card.legacy_cod, class_card.category_name, COALESCE((CASE WHEN (count(1) > 0) THEN array_remove(ARRAY[CASE bool_or(availability_configuration_1.include_sunday) WHEN CASE_TEST_EXPR THEN 0 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_monday) WHEN CASE_TEST_EXPR THEN 1 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_tuesday) WHEN CASE_TEST_EXPR THEN 2 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_wednesday) WHEN CASE_TEST_EXPR THEN 3 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_thursday) WHEN CASE_TEST_EXPR THEN 4 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_friday) WHEN CASE_TEST_EXPR THEN 5 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_saturday) WHEN CASE_TEST_EXPR THEN 6 ELSE NULL::integer END], NULL::integer) ELSE NULL::integer[] END), (array_remove(ARRAY[CASE bool_or(availability_configuration.include_sunday) WHEN CASE_TEST_EXPR THEN 0 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_monday) WHEN CASE_TEST_EXPR THEN 1 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_tuesday) WHEN CASE_TEST_EXPR THEN 2 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_wednesday) WHEN CASE_TEST_EXPR THEN 3 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_thursday) WHEN CASE_TEST_EXPR THEN 4 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_friday) WHEN CASE_TEST_EXPR THEN 5 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_saturday) WHEN CASE_TEST_EXPR THEN 6 ELSE NULL::integer END], NULL::integer)), '{0,1,2,3,4,5,6}'::integer[]), (((array_agg("substring"((legacy_config.chave)::text, 6))) || (array_agg("substring"((legacy_config_1.chave)::text, 6)))) || CASE WHEN (item.promotion_status = 'S'::bpchar) THEN '{MKT::HIGHLIGHT}'::text[] ELSE '{}'::text[] END), (sum(cg.min_group_price)), (product.product_photo)::text, rp1.promo_original_price, rp1.run_price, COALESCE((CASE WHEN (count(1) > 0) THEN array_agg((times_1_1.times)::time without time zone) ELSE NULL::time without time zone[] END), (array_agg((times_1.times)::time without time zone))), ((setweight(to_tsvector('portuguese'::regconfig, (product.product_name)::text), 'A'::"char") || setweight(to_tsvector('portuguese'::regconfig, (COALESCE(product.product_description, ''::character varying))::text), 'B'::"char")) || setweight(to_tsvector('portuguese'::regconfig, (COALESCE(class_card.category_name, ''::character varying))::text), 'C'::"char")), (r.path[1]), (r.path[2]), catalog.catalog_group
  • Buffers: shared hit=5450
4. 0.010 11.809 ↓ 5.7 68 1

Nested Loop Left Join (cost=1,745.03..9,843.38 rows=12 width=476) (actual time=1.494..11.809 rows=68 loops=1)

  • Output: catalog.catalog_group, item.catalog_item_id, item.owner_id, item.promotion_status, product.legacy_cod, product.product_name, product.product_description, product.product_photo, product.product_id, class_card.category_id, class_card.legacy_cod, class_card.category_name, (array_remove(ARRAY[CASE bool_or(availability_configuration.include_sunday) WHEN CASE_TEST_EXPR THEN 0 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_monday) WHEN CASE_TEST_EXPR THEN 1 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_tuesday) WHEN CASE_TEST_EXPR THEN 2 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_wednesday) WHEN CASE_TEST_EXPR THEN 3 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_thursday) WHEN CASE_TEST_EXPR THEN 4 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_friday) WHEN CASE_TEST_EXPR THEN 5 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_saturday) WHEN CASE_TEST_EXPR THEN 6 ELSE NULL::integer END], NULL::integer)), (CASE WHEN (count(1) > 0) THEN array_remove(ARRAY[CASE bool_or(availability_configuration_1.include_sunday) WHEN CASE_TEST_EXPR THEN 0 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_monday) WHEN CASE_TEST_EXPR THEN 1 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_tuesday) WHEN CASE_TEST_EXPR THEN 2 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_wednesday) WHEN CASE_TEST_EXPR THEN 3 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_thursday) WHEN CASE_TEST_EXPR THEN 4 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_friday) WHEN CASE_TEST_EXPR THEN 5 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_saturday) WHEN CASE_TEST_EXPR THEN 6 ELSE NULL::integer END], NULL::integer) ELSE NULL::integer[] END), rp1.promo_original_price, rp1.run_price, (r.path[1]), (r.path[2]), (array_agg((times_1.times)::time without time zone)), (CASE WHEN (count(1) > 0) THEN array_agg((times_1_1.times)::time without time zone) ELSE NULL::time without time zone[] END), (array_agg("substring"((legacy_config.chave)::text, 6))), (array_agg("substring"((legacy_config_1.chave)::text, 6)))
  • Buffers: shared hit=4460
5. 0.008 11.595 ↓ 5.7 68 1

Nested Loop Left Join (cost=1,740.49..9,785.21 rows=12 width=444) (actual time=1.485..11.595 rows=68 loops=1)

  • Output: catalog.catalog_group, item.catalog_item_id, item.owner_id, item.promotion_status, product.legacy_cod, product.product_name, product.product_description, product.product_photo, product.product_id, class_card.category_id, class_card.legacy_cod, class_card.category_name, (array_remove(ARRAY[CASE bool_or(availability_configuration.include_sunday) WHEN CASE_TEST_EXPR THEN 0 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_monday) WHEN CASE_TEST_EXPR THEN 1 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_tuesday) WHEN CASE_TEST_EXPR THEN 2 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_wednesday) WHEN CASE_TEST_EXPR THEN 3 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_thursday) WHEN CASE_TEST_EXPR THEN 4 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_friday) WHEN CASE_TEST_EXPR THEN 5 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_saturday) WHEN CASE_TEST_EXPR THEN 6 ELSE NULL::integer END], NULL::integer)), (CASE WHEN (count(1) > 0) THEN array_remove(ARRAY[CASE bool_or(availability_configuration_1.include_sunday) WHEN CASE_TEST_EXPR THEN 0 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_monday) WHEN CASE_TEST_EXPR THEN 1 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_tuesday) WHEN CASE_TEST_EXPR THEN 2 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_wednesday) WHEN CASE_TEST_EXPR THEN 3 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_thursday) WHEN CASE_TEST_EXPR THEN 4 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_friday) WHEN CASE_TEST_EXPR THEN 5 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_saturday) WHEN CASE_TEST_EXPR THEN 6 ELSE NULL::integer END], NULL::integer) ELSE NULL::integer[] END), rp1.promo_original_price, rp1.run_price, (r.path[1]), (r.path[2]), (array_agg((times_1.times)::time without time zone)), (CASE WHEN (count(1) > 0) THEN array_agg((times_1_1.times)::time without time zone) ELSE NULL::time without time zone[] END), (array_agg("substring"((legacy_config.chave)::text, 6)))
  • Buffers: shared hit=4256
6. 0.077 11.111 ↓ 5.7 68 1

Nested Loop Left Join (cost=1,725.38..9,600.29 rows=12 width=412) (actual time=1.474..11.111 rows=68 loops=1)

  • Output: catalog.catalog_group, item.catalog_item_id, item.owner_id, item.promotion_status, product.legacy_cod, product.product_name, product.product_description, product.product_photo, product.product_id, class_card.category_id, class_card.legacy_cod, class_card.category_name, (array_remove(ARRAY[CASE bool_or(availability_configuration.include_sunday) WHEN CASE_TEST_EXPR THEN 0 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_monday) WHEN CASE_TEST_EXPR THEN 1 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_tuesday) WHEN CASE_TEST_EXPR THEN 2 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_wednesday) WHEN CASE_TEST_EXPR THEN 3 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_thursday) WHEN CASE_TEST_EXPR THEN 4 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_friday) WHEN CASE_TEST_EXPR THEN 5 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_saturday) WHEN CASE_TEST_EXPR THEN 6 ELSE NULL::integer END], NULL::integer)), (CASE WHEN (count(1) > 0) THEN array_remove(ARRAY[CASE bool_or(availability_configuration_1.include_sunday) WHEN CASE_TEST_EXPR THEN 0 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_monday) WHEN CASE_TEST_EXPR THEN 1 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_tuesday) WHEN CASE_TEST_EXPR THEN 2 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_wednesday) WHEN CASE_TEST_EXPR THEN 3 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_thursday) WHEN CASE_TEST_EXPR THEN 4 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_friday) WHEN CASE_TEST_EXPR THEN 5 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_saturday) WHEN CASE_TEST_EXPR THEN 6 ELSE NULL::integer END], NULL::integer) ELSE NULL::integer[] END), rp1.promo_original_price, rp1.run_price, (r.path[1]), (r.path[2]), (array_agg((times_1.times)::time without time zone)), (CASE WHEN (count(1) > 0) THEN array_agg((times_1_1.times)::time without time zone) ELSE NULL::time without time zone[] END)
  • Buffers: shared hit=4052
7. 0.070 10.830 ↓ 5.7 68 1

Nested Loop Left Join (cost=1,507.81..6,985.91 rows=12 width=396) (actual time=1.465..10.830 rows=68 loops=1)

  • Output: catalog.catalog_group, item.catalog_item_id, item.owner_id, item.promotion_status, item.category_id, product.legacy_cod, product.product_name, product.product_description, product.product_photo, product.product_id, class_card.category_id, class_card.legacy_cod, class_card.category_name, (array_remove(ARRAY[CASE bool_or(availability_configuration.include_sunday) WHEN CASE_TEST_EXPR THEN 0 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_monday) WHEN CASE_TEST_EXPR THEN 1 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_tuesday) WHEN CASE_TEST_EXPR THEN 2 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_wednesday) WHEN CASE_TEST_EXPR THEN 3 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_thursday) WHEN CASE_TEST_EXPR THEN 4 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_friday) WHEN CASE_TEST_EXPR THEN 5 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_saturday) WHEN CASE_TEST_EXPR THEN 6 ELSE NULL::integer END], NULL::integer)), (CASE WHEN (count(1) > 0) THEN array_remove(ARRAY[CASE bool_or(availability_configuration_1.include_sunday) WHEN CASE_TEST_EXPR THEN 0 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_monday) WHEN CASE_TEST_EXPR THEN 1 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_tuesday) WHEN CASE_TEST_EXPR THEN 2 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_wednesday) WHEN CASE_TEST_EXPR THEN 3 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_thursday) WHEN CASE_TEST_EXPR THEN 4 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_friday) WHEN CASE_TEST_EXPR THEN 5 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_saturday) WHEN CASE_TEST_EXPR THEN 6 ELSE NULL::integer END], NULL::integer) ELSE NULL::integer[] END), rp1.promo_original_price, rp1.run_price, (r.path[1]), (r.path[2]), (array_agg((times_1.times)::time without time zone))
  • Buffers: shared hit=3848
8. 0.028 5.932 ↓ 5.7 68 1

Nested Loop (cost=1,080.04..1,849.04 rows=12 width=380) (actual time=1.357..5.932 rows=68 loops=1)

  • Output: catalog.catalog_group, item.catalog_item_id, item.owner_id, item.promotion_status, item.product_id, item.category_id, product.legacy_cod, product.product_name, product.product_description, product.product_photo, product.product_id, class_card.category_id, class_card.legacy_cod, class_card.category_name, (array_remove(ARRAY[CASE bool_or(availability_configuration.include_sunday) WHEN CASE_TEST_EXPR THEN 0 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_monday) WHEN CASE_TEST_EXPR THEN 1 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_tuesday) WHEN CASE_TEST_EXPR THEN 2 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_wednesday) WHEN CASE_TEST_EXPR THEN 3 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_thursday) WHEN CASE_TEST_EXPR THEN 4 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_friday) WHEN CASE_TEST_EXPR THEN 5 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_saturday) WHEN CASE_TEST_EXPR THEN 6 ELSE NULL::integer END], NULL::integer)), (CASE WHEN (count(1) > 0) THEN array_remove(ARRAY[CASE bool_or(availability_configuration_1.include_sunday) WHEN CASE_TEST_EXPR THEN 0 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_monday) WHEN CASE_TEST_EXPR THEN 1 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_tuesday) WHEN CASE_TEST_EXPR THEN 2 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_wednesday) WHEN CASE_TEST_EXPR THEN 3 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_thursday) WHEN CASE_TEST_EXPR THEN 4 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_friday) WHEN CASE_TEST_EXPR THEN 5 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_saturday) WHEN CASE_TEST_EXPR THEN 6 ELSE NULL::integer END], NULL::integer) ELSE NULL::integer[] END), rp1.promo_original_price, rp1.run_price, (r.path[1]), (r.path[2])
  • Buffers: shared hit=2828
9. 0.073 5.088 ↓ 5.7 68 1

Nested Loop Left Join (cost=1,079.47..1,790.48 rows=12 width=372) (actual time=1.339..5.088 rows=68 loops=1)

  • Output: catalog.catalog_group, item.catalog_item_id, item.owner_id, item.promotion_status, item.product_id, item.category_id, product.legacy_cod, product.product_name, product.product_description, product.product_photo, product.product_id, class_card.category_id, class_card.legacy_cod, class_card.category_name, (array_remove(ARRAY[CASE bool_or(availability_configuration.include_sunday) WHEN CASE_TEST_EXPR THEN 0 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_monday) WHEN CASE_TEST_EXPR THEN 1 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_tuesday) WHEN CASE_TEST_EXPR THEN 2 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_wednesday) WHEN CASE_TEST_EXPR THEN 3 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_thursday) WHEN CASE_TEST_EXPR THEN 4 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_friday) WHEN CASE_TEST_EXPR THEN 5 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_saturday) WHEN CASE_TEST_EXPR THEN 6 ELSE NULL::integer END], NULL::integer)), (CASE WHEN (count(1) > 0) THEN array_remove(ARRAY[CASE bool_or(availability_configuration_1.include_sunday) WHEN CASE_TEST_EXPR THEN 0 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_monday) WHEN CASE_TEST_EXPR THEN 1 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_tuesday) WHEN CASE_TEST_EXPR THEN 2 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_wednesday) WHEN CASE_TEST_EXPR THEN 3 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_thursday) WHEN CASE_TEST_EXPR THEN 4 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_friday) WHEN CASE_TEST_EXPR THEN 5 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_saturday) WHEN CASE_TEST_EXPR THEN 6 ELSE NULL::integer END], NULL::integer) ELSE NULL::integer[] END), (r.path[1]), (r.path[2])
  • Buffers: shared hit=2488
10. 0.055 4.811 ↓ 5.7 68 1

Nested Loop Left Join (cost=1,069.43..1,666.34 rows=12 width=340) (actual time=1.327..4.811 rows=68 loops=1)

  • Output: catalog.catalog_group, item.catalog_item_id, item.owner_id, item.promotion_status, item.product_id, item.category_id, product.legacy_cod, product.product_name, product.product_description, product.product_photo, product.product_id, class_card.category_id, class_card.legacy_cod, class_card.category_name, (array_remove(ARRAY[CASE bool_or(availability_configuration.include_sunday) WHEN CASE_TEST_EXPR THEN 0 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_monday) WHEN CASE_TEST_EXPR THEN 1 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_tuesday) WHEN CASE_TEST_EXPR THEN 2 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_wednesday) WHEN CASE_TEST_EXPR THEN 3 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_thursday) WHEN CASE_TEST_EXPR THEN 4 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_friday) WHEN CASE_TEST_EXPR THEN 5 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_saturday) WHEN CASE_TEST_EXPR THEN 6 ELSE NULL::integer END], NULL::integer)), (r.path[1]), (r.path[2])
  • Buffers: shared hit=2284
11. 0.086 2.716 ↓ 5.7 68 1

Nested Loop (cost=1,051.67..1,449.56 rows=12 width=308) (actual time=1.278..2.716 rows=68 loops=1)

  • Output: catalog.catalog_group, item.catalog_item_id, item.owner_id, item.promotion_status, item.product_id, item.category_id, product.legacy_cod, product.product_name, product.product_description, product.product_photo, product.product_id, class_card.category_id, class_card.legacy_cod, class_card.category_name, (r.path[1]), (r.path[2])
  • Inner Unique: true
  • Buffers: shared hit=1264
12. 0.047 2.222 ↓ 4.2 68 1

Nested Loop (cost=1,051.25..1,377.00 rows=16 width=308) (actual time=1.267..2.222 rows=68 loops=1)

  • Output: item.catalog_item_id, item.owner_id, item.promotion_status, item.product_id, item.category_id, item.catalog_id, product.legacy_cod, product.product_name, product.product_description, product.product_photo, product.product_id, class_card.category_id, class_card.legacy_cod, class_card.category_name, (r.path[1]), (r.path[2])
  • Inner Unique: true
  • Buffers: shared hit=991
13. 0.090 1.563 ↓ 3.0 68 1

Hash Right Join (cost=1,050.82..1,272.52 rows=23 width=270) (actual time=1.254..1.563 rows=68 loops=1)

  • Output: item.catalog_item_id, item.owner_id, item.promotion_status, item.product_id, item.category_id, item.catalog_id, product.legacy_cod, product.product_name, product.product_description, product.product_photo, product.product_id, (r.path[1]), (r.path[2])
  • Hash Cond: (r.taxonomy_id = product.taxonomy_id)
  • Join Filter: (product.taxonomy_classifier_score >= 0.4)
  • Buffers: shared hit=719
14. 0.417 0.417 ↑ 9.1 79 1

CTE Scan on r (cost=528.52..672.12 rows=718 width=80) (actual time=0.011..0.417 rows=79 loops=1)

  • Output: r.taxonomy_id, r.path[1], r.path[2]
  • Buffers: shared hit=4
15.          

CTE r

16. 0.046 0.347 ↑ 9.1 79 1

Recursive Union (cost=0.14..528.52 rows=718 width=60) (actual time=0.008..0.347 rows=79 loops=1)

  • Buffers: shared hit=4
17. 0.011 0.011 ↑ 1.0 8 1

Index Scan using taxonomy_parent_taxonomy_id_idx on ifood_catalog.taxonomy t (cost=0.14..5.00 rows=8 width=60) (actual time=0.007..0.011 rows=8 loops=1)

  • Output: ARRAY[(t.taxonomy_name)::text], t.taxonomy_id, t.taxonomy_name
  • Index Cond: (t.parent_taxonomy_id IS NULL)
  • Buffers: shared hit=2
18. 0.108 0.290 ↑ 2.0 36 2

Merge Join (cost=29.92..37.99 rows=71 width=60) (actual time=0.096..0.145 rows=36 loops=2)

  • Output: (r_1.path || (t_1.taxonomy_name)::text), t_1.taxonomy_id, t_1.taxonomy_name
  • Merge Cond: (t_1.parent_taxonomy_id = r_1.taxonomy_id)
  • Buffers: shared hit=2
19. 0.074 0.124 ↑ 1.1 72 2

Sort (cost=11.39..11.59 rows=79 width=44) (actual time=0.056..0.062 rows=72 loops=2)

  • Output: t_1.taxonomy_name, t_1.taxonomy_id, t_1.parent_taxonomy_id
  • Sort Key: t_1.parent_taxonomy_id
  • Sort Method: quicksort Memory: 32kB
  • Buffers: shared hit=2
20. 0.050 0.050 ↑ 1.0 79 2

Seq Scan on ifood_catalog.taxonomy t_1 (cost=0.00..8.90 rows=79 width=44) (actual time=0.004..0.025 rows=79 loops=2)

  • Output: t_1.taxonomy_name, t_1.taxonomy_id, t_1.parent_taxonomy_id
  • Buffers: shared hit=2
21. 0.044 0.058 ↑ 1.2 64 2

Sort (cost=18.53..18.73 rows=80 width=48) (actual time=0.023..0.029 rows=64 loops=2)

  • Output: r_1.path, r_1.taxonomy_id
  • Sort Key: r_1.taxonomy_id
  • Sort Method: quicksort Memory: 34kB
22. 0.014 0.014 ↑ 2.0 40 2

WorkTable Scan on r r_1 (cost=0.00..16.00 rows=80 width=48) (actual time=0.001..0.007 rows=40 loops=2)

  • Output: r_1.path, r_1.taxonomy_id
23. 0.041 1.056 ↓ 3.0 68 1

Hash (cost=519.94..519.94 rows=23 width=232) (actual time=1.056..1.056 rows=68 loops=1)

  • Output: item.catalog_item_id, item.owner_id, item.promotion_status, item.product_id, item.category_id, item.catalog_id, product.legacy_cod, product.product_name, product.product_description, product.product_photo, product.product_id, product.taxonomy_id, product.taxonomy_classifier_score
  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
  • Buffers: shared hit=715
24. 0.030 1.015 ↓ 3.0 68 1

Nested Loop (cost=1.13..519.94 rows=23 width=232) (actual time=0.038..1.015 rows=68 loops=1)

  • Output: item.catalog_item_id, item.owner_id, item.promotion_status, item.product_id, item.category_id, item.catalog_id, product.legacy_cod, product.product_name, product.product_description, product.product_photo, product.product_id, product.taxonomy_id, product.taxonomy_classifier_score
  • Inner Unique: true
  • Buffers: shared hit=715
25. 0.373 0.373 ↓ 1.9 68 1

Index Scan using catalog_item_catalog_item_id_pkey on ifood_catalog.catalog_item item (cost=0.56..351.37 rows=36 width=82) (actual time=0.023..0.373 rows=68 loops=1)

  • Output: item.catalog_item_id, item.catalog_id, item.category_id, item.owner_id, item.sequence, item.product_id, item.can_change_price, item.can_change_availability, item.status, item.created_at, item.modified_at, item.promotion_status, item.external_code, item.operation_modes
  • Index Cond: (item.catalog_item_id = ANY ('{ba0a4cf8-51cf-4adb-99c3-c75d62a54631,ba0a64a7-59c0-4d90-b881-a93e173cd4f0,ba0aa9b1-9b6d-4c4e-aba2-66c38dbff713,ba0ab648-53da-484c-88d3-3b90a5050a19,ba0ab840-0ed1-4a23-a0e1-d8802e4d4c56,ba0ac2c3-a326-4d77-9312-4e8f6c3f744b,ba0ad7d6-2c1e-4f2e-b62b-c8e9ee0e8c5f,ba0ada97-140a-4b7d-9be7-792e78ce9c09,ba0b13de-1269-45b5-9159-1904ccfbf85a,ba0b47df-f355-4c16-996b-bf8e38daa466,ba0b5039-1844-44fe-a24f-1a834a633829,ba0bbe6f-172e-4ef3-8728-3faa42bc620b,ba0bde61-65ea-444a-b164-cbc7fb664a9c,ba0c2137-fcdd-4bd4-b30b-68412d35d783,ba0c788e-b6af-4f7c-8570-9e840d79af72,ba0d2f21-2efc-456e-9aaa-3a01eb9c3108,ba0d4a04-e15f-4a5a-89ed-cd1059c5ec57,ba0d5095-9634-48a4-8407-ac4756734d16,ba0d6ab7-9565-4f59-8b69-d2840613fe5f,ba0de72c-14f5-4663-b51b-2bb5ffabf309,ba0e2900-1ae9-4733-96c8-6ff43020195c,ba0e300e-4fb5-4587-a038-e813f178901d,ba0e4c4c-4ae7-46d7-9086-49c2bd8cafcf,ba0e78f4-4b30-4367-bca2-2bd4e9527975,ba0ed691-c96e-4f00-910a-fdf6058ebea5,ba0f1db9-c798-4d51-aa0a-e15b8f26a8a1,ba0f4783-b64b-4bc7-b376-a14401822750,ba0f8529-3e66-4710-ac76-8aad2dd66faf,ba0f8985-d830-42a5-8fdd-feed7884b3c3,ba0f8e58-918d-438c-be7e-52db3091e148,ba0fa8e6-03a9-4385-a805-fbdebe551c8e,ba0fe967-4feb-4d15-b976-55c0ff0558a3,ba100650-3a0d-4947-b7df-391ea59750d5,ba102a36-9b44-41f9-8596-151e755ddf4b,ba105065-e258-457b-a868-c6a2966f2102,ba108f51-9989-4eeb-81d9-015383d87bc9,ba109627-0a16-456e-a8f6-3bea52bf0ad7,ba109b03-ef14-4e4c-96df-ca4b2c923d57,ba10c958-3f7e-4c6c-8d72-7fe76b7aa3c0,ba10fd13-3fb8-4464-999d-d6895c4cbf35,ba110c8a-40d3-427c-b103-411f605dce19,ba115536-7701-44b7-a78b-9fa1807ca077,ba117b9e-a0dc-4601-82ba-5ede1b95737a,ba122d7b-0858-4d35-bf2e-9c331181ea1c,ba1265e1-9de4-43fc-8665-ea04fde5c161,ba129f62-3da7-4113-b5df-3988286118cf,ba12dc0f-702d-4916-b1e8-dc057e451338,ba12fd6e-9d04-4054-9897-ba67e6268515,ba13004d-207f-4f71-8ce8-3a0b9c1e0b18,ba130321-3566-420d-8680-a54bae028c36,ba1341ce-f5b2-4cf2-89c5-9b52484ba638,ba1357d0-2030-40d3-a347-3736ef741a00,ba1360fc-4303-429b-960c-ad1fe86ffe7f,ba139839-dd72-4143-80fa-0f8722c121ff,ba13a755-6f44-423d-b22b-e24ddc4ae532,ba13aa5b-26cd-476b-9aac-6f10b5854b07,ba1480b6-64d5-409a-aae4-168221bdd435,ba148cf7-af42-45a2-b907-e0726a684767,ba150c80-2384-49bc-958f-533da559d8e6,ba15126b-a96a-456f-b2e7-c34cdc4b37e1,ba157484-9da3-4a35-9fc1-7ab6b5fa2cee,ba15799a-83bc-4d55-8d2b-3b8d32aade52,ba157f9d-a7de-427d-bdf0-b1f8327bae95,ba1595f5-6c72-4f11-bc80-3aea62e8b004,ba15e66b-ddad-4baf-8077-6b387e761c9c,ba15eb4f-4fa3-4f43-ae2e-bccdf6bdcdcc,ba165f87-2658-47a3-947b-4eca6a78be8d,ba166316-eb19-49ec-ac5a-21cbd62bf84a,ba1681a3-8a42-4319-98bc-d9e958a489ce,ba1690a9-ec93-474a-8ea9-258b2d08948d,ba169241-f32c-4cf6-aba0-b1a687658dc5,ba169cf5-197d-4ff0-b4a6-49367388449b,ba16aa00-b8fc-4ef3-b72e-3b8e891a24e8,ba16b368-51a9-49bb-996f-d0aaec851dea,ba16c16f-e7eb-483a-b3cf-06ef6a49b2d5}'::uuid[]))
  • Filter: ((item.status = 'A'::bpchar) AND ((item.operation_modes IS NULL) OR ('DELIVERY'::ifood_catalog.operationmodes = ANY (item.operation_modes))))
  • Rows Removed by Filter: 7
  • Buffers: shared hit=375
26. 0.612 0.612 ↑ 1.0 1 68

Index Scan using product_product_id_pkey on ifood_catalog.product (cost=0.57..4.68 rows=1 width=150) (actual time=0.009..0.009 rows=1 loops=68)

  • Output: product.product_id, product.owner_id, product.product_type, product.taxonomy_id, product.external_code, product.product_name, product.product_short_name, product.product_description, product.product_photo, product.unit_type, product.price_mode, product.product_ean, product.status, product.created_at, product.modified_at, product.legacy_is_complemento, product.product_photo_height, product.product_photo_width, product.legacy_cod, product.classified_at, product.classification_method, product.taxonomy_classifier_score, product.violation_classifier_score
  • Index Cond: (product.product_id = item.product_id)
  • Filter: (((product.violation_classifier_score IS NULL) OR (product.violation_classifier_score < 0.9)) AND (product.status = 'A'::bpchar))
  • Buffers: shared hit=340
27. 0.612 0.612 ↑ 1.0 1 68

Index Scan using category_category_id_pkey on ifood_catalog.category class_card (cost=0.43..4.54 rows=1 width=38) (actual time=0.009..0.009 rows=1 loops=68)

  • Output: class_card.category_id, class_card.catalog_id, class_card.owner_id, class_card.sequence, class_card.external_code, class_card.category_name, class_card.category_description, class_card.can_change_price, class_card.can_change_availability, class_card.can_add_item, class_card.status, class_card.created_at, class_card.modified_at, class_card.legacy_cod, class_card.legacy_template, class_card.violation_classifier_score
  • Index Cond: (class_card.category_id = item.category_id)
  • Filter: (((class_card.violation_classifier_score IS NULL) OR (class_card.violation_classifier_score < 0.9)) AND (class_card.status = 'A'::bpchar))
  • Buffers: shared hit=272
28. 0.408 0.408 ↑ 1.0 1 68

Index Scan using catalog_catalog_id_pkey on ifood_catalog.catalog (cost=0.42..4.54 rows=1 width=32) (actual time=0.006..0.006 rows=1 loops=68)

  • Output: catalog.catalog_id, catalog.owner_id, catalog.catalog_name, catalog.catalog_description, catalog.can_change_price, catalog.can_change_availability, catalog.can_add_category, catalog.status, catalog.created_at, catalog.modified_at, catalog.catalog_type, catalog.catalog_group
  • Index Cond: (catalog.catalog_id = item.catalog_id)
  • Filter: (catalog.status = 'A'::bpchar)
  • Buffers: shared hit=273
29. 0.136 2.040 ↑ 1.0 1 68

Aggregate (cost=17.76..17.87 rows=1 width=32) (actual time=0.030..0.030 rows=1 loops=68)

  • Output: array_remove(ARRAY[CASE bool_or(availability_configuration.include_sunday) WHEN CASE_TEST_EXPR THEN 0 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_monday) WHEN CASE_TEST_EXPR THEN 1 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_tuesday) WHEN CASE_TEST_EXPR THEN 2 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_wednesday) WHEN CASE_TEST_EXPR THEN 3 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_thursday) WHEN CASE_TEST_EXPR THEN 4 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_friday) WHEN CASE_TEST_EXPR THEN 5 ELSE NULL::integer END, CASE bool_or(availability_configuration.include_saturday) WHEN CASE_TEST_EXPR THEN 6 ELSE NULL::integer END], NULL::integer)
  • Buffers: shared hit=1020
30. 0.068 1.904 ↑ 2.0 1 68

Nested Loop (cost=1.69..17.73 rows=2 width=7) (actual time=0.027..0.028 rows=1 loops=68)

  • Output: availability_configuration.include_sunday, availability_configuration.include_monday, availability_configuration.include_tuesday, availability_configuration.include_wednesday, availability_configuration.include_thursday, availability_configuration.include_friday, availability_configuration.include_saturday
  • Buffers: shared hit=1020
31. 0.068 1.224 ↑ 2.0 1 68

Nested Loop (cost=1.12..16.12 rows=2 width=32) (actual time=0.018..0.018 rows=1 loops=68)

  • Output: ao.availability_option_id, a.availability_option_id
  • Inner Unique: true
  • Buffers: shared hit=680
32. 0.612 0.612 ↑ 2.0 1 68

Index Scan using availability_product_id_fk_idx on ifood_catalog.availability a (cost=0.56..6.78 rows=2 width=16) (actual time=0.009..0.009 rows=1 loops=68)

  • Output: a.availability_id, a.availability_option_id, a.availability_type, a.catalog_id, a.category_id, a.catalog_item_id, a.product_id, a.effective_start_date, a.effective_end_date, a.promotion_item_id
  • Index Cond: (a.product_id = product.product_id)
  • Buffers: shared hit=340
33. 0.544 0.544 ↑ 1.0 1 68

Index Scan using availability_option_availability_option_id_pkey on ifood_catalog.availability_option ao (cost=0.56..4.67 rows=1 width=16) (actual time=0.008..0.008 rows=1 loops=68)

  • Output: ao.availability_option_id, ao.owner_id, ao.availability_name, ao.availability_description, ao.status
  • Index Cond: (ao.availability_option_id = a.availability_option_id)
  • Filter: (ao.status = 'A'::bpchar)
  • Buffers: shared hit=340
34. 0.612 0.612 ↑ 1.0 1 68

Index Scan using availability_configuration_availability_option_id_fk_idx on ifood_catalog.availability_configuration (cost=0.56..0.70 rows=1 width=23) (actual time=0.008..0.009 rows=1 loops=68)

  • Output: availability_configuration.availability_configuration_id, availability_configuration.availability_option_id, availability_configuration.include_monday, availability_configuration.include_tuesday, availability_configuration.include_wednesday, availability_configuration.include_thursday, availability_configuration.include_friday, availability_configuration.include_saturday, availability_configuration.include_sunday, availability_configuration.start_time, availability_configuration.end_time
  • Index Cond: (availability_configuration.availability_option_id = ao.availability_option_id)
  • Buffers: shared hit=340
35. 0.000 0.204 ↑ 1.0 1 68

Aggregate (cost=10.04..10.15 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=68)

  • Output: CASE WHEN (count(1) > 0) THEN array_remove(ARRAY[CASE bool_or(availability_configuration_1.include_sunday) WHEN CASE_TEST_EXPR THEN 0 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_monday) WHEN CASE_TEST_EXPR THEN 1 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_tuesday) WHEN CASE_TEST_EXPR THEN 2 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_wednesday) WHEN CASE_TEST_EXPR THEN 3 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_thursday) WHEN CASE_TEST_EXPR THEN 4 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_friday) WHEN CASE_TEST_EXPR THEN 5 ELSE NULL::integer END, CASE bool_or(availability_configuration_1.include_saturday) WHEN CASE_TEST_EXPR THEN 6 ELSE NULL::integer END], NULL::integer) ELSE NULL::integer[] END
  • Buffers: shared hit=204
36. 0.068 0.204 ↓ 0.0 0 68

Nested Loop (cost=1.56..10.02 rows=1 width=7) (actual time=0.003..0.003 rows=0 loops=68)

  • Output: availability_configuration_1.include_sunday, availability_configuration_1.include_monday, availability_configuration_1.include_tuesday, availability_configuration_1.include_wednesday, availability_configuration_1.include_thursday, availability_configuration_1.include_friday, availability_configuration_1.include_saturday
  • Buffers: shared hit=204
37. 0.000 0.136 ↓ 0.0 0 68

Nested Loop (cost=1.00..9.22 rows=1 width=32) (actual time=0.002..0.002 rows=0 loops=68)

  • Output: ao_1.availability_option_id, a_1.availability_option_id
  • Inner Unique: true
  • Buffers: shared hit=204
38. 0.136 0.136 ↓ 0.0 0 68

Index Scan using availability_category_id_fk_idx on ifood_catalog.availability a_1 (cost=0.44..4.54 rows=1 width=16) (actual time=0.002..0.002 rows=0 loops=68)

  • Output: a_1.availability_id, a_1.availability_option_id, a_1.availability_type, a_1.catalog_id, a_1.category_id, a_1.catalog_item_id, a_1.product_id, a_1.effective_start_date, a_1.effective_end_date, a_1.promotion_item_id
  • Index Cond: (a_1.category_id = class_card.category_id)
  • Buffers: shared hit=204
39. 0.000 0.000 ↓ 0.0 0

Index Scan using availability_option_availability_option_id_pkey on ifood_catalog.availability_option ao_1 (cost=0.56..4.67 rows=1 width=16) (never executed)

  • Output: ao_1.availability_option_id, ao_1.owner_id, ao_1.availability_name, ao_1.availability_description, ao_1.status
  • Index Cond: (ao_1.availability_option_id = a_1.availability_option_id)
  • Filter: (ao_1.status = 'A'::bpchar)
40. 0.000 0.000 ↓ 0.0 0

Index Scan using availability_configuration_availability_option_id_fk_idx on ifood_catalog.availability_configuration availability_configuration_1 (cost=0.56..0.70 rows=1 width=23) (never executed)

  • Output: availability_configuration_1.availability_configuration_id, availability_configuration_1.availability_option_id, availability_configuration_1.include_monday, availability_configuration_1.include_tuesday, availability_configuration_1.include_wednesday, availability_configuration_1.include_thursday, availability_configuration_1.include_friday, availability_configuration_1.include_saturday, availability_configuration_1.include_sunday, availability_configuration_1.start_time, availability_configuration_1.end_time
  • Index Cond: (availability_configuration_1.availability_option_id = ao_1.availability_option_id)
41. 0.068 0.816 ↑ 1.0 1 68

Limit (cost=0.57..4.68 rows=1 width=16) (actual time=0.011..0.012 rows=1 loops=68)

  • Output: rp1.run_price, rp1.promo_original_price, rp1.effective_start_date
  • Buffers: shared hit=340
42. 0.748 0.748 ↑ 1.0 1 68

Index Scan Backward using run_price_product_id_owner_id_effective_start_date_idx on ifood_catalog.run_price rp1 (cost=0.57..4.68 rows=1 width=16) (actual time=0.011..0.011 rows=1 loops=68)

  • Output: rp1.run_price, rp1.promo_original_price, rp1.effective_start_date
  • Index Cond: ((rp1.product_id = product.product_id) AND (rp1.owner_id = item.owner_id) AND (rp1.effective_start_date <= now()))
  • Buffers: shared hit=340
43. 1.428 4.828 ↑ 1.0 1 68

Aggregate (cost=427.77..427.87 rows=1 width=32) (actual time=0.071..0.071 rows=1 loops=68)

  • Output: array_agg((times_1.times)::time without time zone)
  • Buffers: shared hit=1020
44. 1.020 3.400 ↑ 20.8 96 68

Nested Loop (cost=1.73..417.77 rows=2,000 width=8) (actual time=0.028..0.050 rows=96 loops=68)

  • Output: times_1.times
  • Buffers: shared hit=1020
45. 0.068 0.748 ↑ 2.0 1 68

Nested Loop (cost=1.69..17.73 rows=2 width=16) (actual time=0.010..0.011 rows=1 loops=68)

  • Output: availability_configuration_2.start_time, availability_configuration_2.end_time
  • Buffers: shared hit=1020
46. 0.068 0.476 ↑ 2.0 1 68

Nested Loop (cost=1.12..16.13 rows=2 width=32) (actual time=0.007..0.007 rows=1 loops=68)

  • Output: ao_2.availability_option_id, a_2.availability_option_id
  • Inner Unique: true
  • Buffers: shared hit=680
47. 0.204 0.204 ↑ 2.0 1 68

Index Scan using availability_product_id_fk_idx on ifood_catalog.availability a_2 (cost=0.56..6.78 rows=2 width=16) (actual time=0.003..0.003 rows=1 loops=68)

  • Output: a_2.availability_id, a_2.availability_option_id, a_2.availability_type, a_2.catalog_id, a_2.category_id, a_2.catalog_item_id, a_2.product_id, a_2.effective_start_date, a_2.effective_end_date, a_2.promotion_item_id
  • Index Cond: (a_2.product_id = item.product_id)
  • Buffers: shared hit=340
48. 0.204 0.204 ↑ 1.0 1 68

Index Scan using availability_option_availability_option_id_pkey on ifood_catalog.availability_option ao_2 (cost=0.56..4.68 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=68)

  • Output: ao_2.availability_option_id, ao_2.owner_id, ao_2.availability_name, ao_2.availability_description, ao_2.status
  • Index Cond: (ao_2.availability_option_id = a_2.availability_option_id)
  • Filter: ((ao_2.status <> 'D'::bpchar) AND (ao_2.status = 'A'::bpchar))
  • Buffers: shared hit=340
49. 0.204 0.204 ↑ 1.0 1 68

Index Scan using availability_configuration_availability_option_id_fk_idx on ifood_catalog.availability_configuration availability_configuration_2 (cost=0.56..0.70 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=68)

  • Output: availability_configuration_2.availability_configuration_id, availability_configuration_2.availability_option_id, availability_configuration_2.include_monday, availability_configuration_2.include_tuesday, availability_configuration_2.include_wednesday, availability_configuration_2.include_thursday, availability_configuration_2.include_friday, availability_configuration_2.include_saturday, availability_configuration_2.include_sunday, availability_configuration_2.start_time, availability_configuration_2.end_time
  • Index Cond: (availability_configuration_2.availability_option_id = ao_2.availability_option_id)
  • Buffers: shared hit=340
50. 1.632 1.632 ↑ 10.4 96 68

Function Scan on pg_catalog.generate_series times_1 (cost=0.04..100.04 rows=1,000 width=8) (actual time=0.017..0.024 rows=96 loops=68)

  • Output: times_1.times
  • Function Call: generate_series((concat((now())::date, ' ', (availability_configuration_2.start_time)::text))::timestamp without time zone, (concat((now())::date, ' ', (availability_configuration_2.end_time)::text))::timestamp without time zone, '00:15:00'::interval)
51. 0.000 0.204 ↑ 1.0 1 68

Aggregate (cost=217.56..217.67 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=68)

  • Output: CASE WHEN (count(1) > 0) THEN array_agg((times_1_1.times)::time without time zone) ELSE NULL::time without time zone[] END
  • Buffers: shared hit=204
52. 0.000 0.204 ↓ 0.0 0 68

Nested Loop (cost=1.60..210.06 rows=1,000 width=8) (actual time=0.003..0.003 rows=0 loops=68)

  • Output: times_1_1.times
  • Buffers: shared hit=204
53. 0.068 0.204 ↓ 0.0 0 68

Nested Loop (cost=1.56..10.02 rows=1 width=16) (actual time=0.003..0.003 rows=0 loops=68)

  • Output: availability_configuration_3.start_time, availability_configuration_3.end_time
  • Buffers: shared hit=204
54. 0.000 0.136 ↓ 0.0 0 68

Nested Loop (cost=1.00..9.22 rows=1 width=32) (actual time=0.002..0.002 rows=0 loops=68)

  • Output: ao_3.availability_option_id, a_3.availability_option_id
  • Inner Unique: true
  • Buffers: shared hit=204
55. 0.136 0.136 ↓ 0.0 0 68

Index Scan using availability_category_id_fk_idx on ifood_catalog.availability a_3 (cost=0.44..4.54 rows=1 width=16) (actual time=0.002..0.002 rows=0 loops=68)

  • Output: a_3.availability_id, a_3.availability_option_id, a_3.availability_type, a_3.catalog_id, a_3.category_id, a_3.catalog_item_id, a_3.product_id, a_3.effective_start_date, a_3.effective_end_date, a_3.promotion_item_id
  • Index Cond: (a_3.category_id = item.category_id)
  • Buffers: shared hit=204
56. 0.000 0.000 ↓ 0.0 0

Index Scan using availability_option_availability_option_id_pkey on ifood_catalog.availability_option ao_3 (cost=0.56..4.68 rows=1 width=16) (never executed)

  • Output: ao_3.availability_option_id, ao_3.owner_id, ao_3.availability_name, ao_3.availability_description, ao_3.status
  • Index Cond: (ao_3.availability_option_id = a_3.availability_option_id)
  • Filter: ((ao_3.status <> 'D'::bpchar) AND (ao_3.status = 'A'::bpchar))
57. 0.000 0.000 ↓ 0.0 0

Index Scan using availability_configuration_availability_option_id_fk_idx on ifood_catalog.availability_configuration availability_configuration_3 (cost=0.56..0.70 rows=1 width=32) (never executed)

  • Output: availability_configuration_3.availability_configuration_id, availability_configuration_3.availability_option_id, availability_configuration_3.include_monday, availability_configuration_3.include_tuesday, availability_configuration_3.include_wednesday, availability_configuration_3.include_thursday, availability_configuration_3.include_friday, availability_configuration_3.include_saturday, availability_configuration_3.include_sunday, availability_configuration_3.start_time, availability_configuration_3.end_time
  • Index Cond: (availability_configuration_3.availability_option_id = ao_3.availability_option_id)
58. 0.000 0.000 ↓ 0.0 0

Function Scan on pg_catalog.generate_series times_1_1 (cost=0.04..100.04 rows=1,000 width=8) (never executed)

  • Output: times_1_1.times
  • Function Call: generate_series((concat((now())::date, ' ', (availability_configuration_3.start_time)::text))::timestamp without time zone, (concat((now())::date, ' ', (availability_configuration_3.end_time)::text))::timestamp without time zone, '00:15:00'::interval)
59. 0.068 0.476 ↑ 1.0 1 68

Aggregate (cost=15.11..15.21 rows=1 width=32) (actual time=0.006..0.007 rows=1 loops=68)

  • Output: array_agg("substring"((legacy_config.chave)::text, 6))
  • Buffers: shared hit=204
60. 0.408 0.408 ↓ 0.0 0 68

Index Scan using legacy_config_product_id_idx on ifood_catalog.legacy_config (cost=0.43..15.08 rows=6 width=20) (actual time=0.006..0.006 rows=0 loops=68)

  • Output: legacy_config.product_id, legacy_config.valor, legacy_config.chave, legacy_config.owner_id, legacy_config.catalog_item_id, legacy_config.legacy_config_id
  • Index Cond: (legacy_config.product_id = product.product_id)
  • Buffers: shared hit=204
61. 0.068 0.204 ↑ 1.0 1 68

Aggregate (cost=4.55..4.65 rows=1 width=32) (actual time=0.002..0.003 rows=1 loops=68)

  • Output: array_agg("substring"((legacy_config_1.chave)::text, 6))
  • Buffers: shared hit=204
62. 0.136 0.136 ↓ 0.0 0 68

Index Scan using legacy_config_catalog_item_id_idx on ifood_catalog.legacy_config legacy_config_1 (cost=0.43..4.54 rows=1 width=20) (actual time=0.002..0.002 rows=0 loops=68)

  • Output: legacy_config_1.product_id, legacy_config_1.valor, legacy_config_1.chave, legacy_config_1.owner_id, legacy_config_1.catalog_item_id, legacy_config_1.legacy_config_id
  • Index Cond: (legacy_config_1.catalog_item_id = item.catalog_item_id)
  • Buffers: shared hit=204
63. 0.068 1.768 ↑ 1.0 1 68

Aggregate (cost=92.88..92.98 rows=1 width=32) (actual time=0.026..0.026 rows=1 loops=68)

  • Output: sum(cg.min_group_price)
  • Buffers: shared hit=990
64. 0.178 1.700 ↑ 6.5 2 68

Nested Loop (cost=1.12..92.84 rows=13 width=3) (actual time=0.017..0.025 rows=2 loops=68)

  • Output: cg.min_group_price
  • Inner Unique: true
  • Buffers: shared hit=990
65. 0.612 0.612 ↑ 6.5 2 68

Index Scan using cgm_product_id_fk_idx on ifood_catalog.customization_group_member cgm (cost=0.56..32.10 rows=13 width=16) (actual time=0.008..0.009 rows=2 loops=68)

  • Output: cgm.customization_group_member_id, cgm.customization_group_id, cgm.product_id, cgm.category_id, cgm.status, cgm.sequence, cgm.min_customization_options, cgm.max_customization_options, cgm.created_at, cgm.modified_at, cgm.promotion_item_id
  • Index Cond: (cgm.product_id = product.product_id)
  • Filter: (cgm.status <> 'D'::bpchar)
  • Buffers: shared hit=340
66. 0.910 0.910 ↑ 1.0 1 130

Index Scan using customization_group_customization_group_id_pkey on ifood_catalog.customization_group cg (cost=0.56..4.67 rows=1 width=19) (actual time=0.007..0.007 rows=1 loops=130)

  • Output: cg.customization_group_id, cg.owner_id, cg.customization_group_name, cg.customization_group_description, cg.status, cg.min_group_price
  • Index Cond: (cg.customization_group_id = cgm.customization_group_id)
  • Filter: (cg.status <> 'D'::bpchar)
  • Buffers: shared hit=650
Planning time : 4.844 ms
Execution time : 15.201 ms