explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Qii

Settings
# exclusive inclusive rows x rows loops node
1. 213.268 1,238.626 ↓ 255.9 64,484 1

Unique (cost=27,999.38..28,063.01 rows=252 width=2,608) (actual time=958.522..1,238.626 rows=64,484 loops=1)

2. 848.132 1,025.358 ↓ 255.9 64,484 1

Sort (cost=27,999.38..28,000.01 rows=252 width=2,608) (actual time=958.521..1,025.358 rows=64,484 loops=1)

  • Sort Key: kitchenbra0_.id, kitchenbra1_.id, kitchenbra2_.id, kitchenbra3_.id, timeperiod4_.day, timeperiod4_.from_time, timeperiod4_.menu_availability_setting_id, timeperiod4_.to_time, kitchenbra5_.id, kitchenbra7_.id, timeperiod8_.day, timeperiod8_.from_time, timeperiod8_.menu_availability_setting_id, timeperiod8_.to_time, kitchenbra9_.id, kitchenbra0_.entity_created, kitchenbra0_.version, kitchenbra0_.available, kitchenbra0_.order_workflow_id, kitchenbra0_.price, kitchenbra0_.tax_id, kitchenbra0_.tax_name, kitchenbra0_.tax_type, kitchenbra0_.tax_value, kitchenbra0_.updated_at, kitchenbra0_.variant_id, kitchenbra0_.variant_name, kitchenbra0_.variant_name_translations, kitchenbra0_.variant_value_id, kitchenbra0_.variant_value_label, kitchenbra0_.variant_value_label_translations, kitchenbra1_.entity_created, kitchenbra1_.version, kitchenbra1_.allowed_outside_combo, kitchenbra1_.description, kitchenbra1_.description_translations, kitchenbra1_.dynamics_id, kitchenbra1_.global_item_id, kitchenbra1_.image_uri, kitchenbra1_.menu_item_id, kitchenbra1_.menu_item_master_id, kitchenbra1_.name, kitchenbra1_.name_translations, kitchenbra1_.item_order, kitchenbra1_.out_of_stock, kitchenbra1_.station_id, kitchenbra1_.updated_at, kitchenbra2_.entity_created, kitchenbra2_.version, kitchenbra2_.availability_setting_id, kitchenbra2_.menu_category_id, kitchenbra2_.menu_category_master_id, kitchenbra2_.name, kitchenbra2_.name_translations, kitchenbra2_.category_order, kitchenbra2_.state, kitchenbra2_.updated_at, kitchenbra3_.entity_created, kitchenbra3_.version, kitchenbra3_.from_date, kitchenbra3_.menu_availability_setting_id, kitchenbra3_.open_all_day_friday, kitchenbra3_.open_all_day_monday, kitchenbra3_.open_all_day_saturday, kitchenbra3_.open_all_day_sunday, kitchenbra3_.open_all_day_thursday, kitchenbra3_.open_all_day_tuesday, kitchenbra3_.open_all_day_wednesday, kitchenbra3_.to_date, kitchenbra5_.entity_created, kitchenbra5_.version, kitchenbra5_.menu_id, kitchenbra5_.menu_master_id, kitchenbra5_.name, kitchenbra5_.name_translations, kitchenbra5_.state, kitchenbra5_.updated_at, kitchenbra7_.entity_created, kitchenbra7_.version, kitchenbra7_.from_date, kitchenbra7_.menu_availability_setting_id, kitchenbra7_.open_all_day_friday, kitchenbra7_.open_all_day_monday, kitchenbra7_.open_all_day_saturday, kitchenbra7_.open_all_day_sunday, kitchenbra7_.open_all_day_thursday, kitchenbra7_.open_all_day_tuesday, kitchenbra7_.open_all_day_wednesday, kitchenbra7_.to_date, kitchenbra9_.entity_created, kitchenbra9_.version, kitchenbra9_.abbreviation, kitchenbra9_.brand_dynamics_id, kitchenbra9_.category, kitchenbra9_.description, kitchenbra9_.image_uri, kitchenbra9_.logo_uri, kitchenbra9_.name, kitchenbra9_.state, kitchenbra9_.updated_at
  • Sort Method: external merge Disk: 143,952kB
3. 18.382 177.226 ↓ 255.9 64,484 1

Gather (cost=6,936.99..27,989.33 rows=252 width=2,608) (actual time=72.974..177.226 rows=64,484 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 14.692 158.844 ↓ 204.7 21,495 3 / 3

Nested Loop Left Join (cost=5,936.99..26,964.13 rows=105 width=2,608) (actual time=65.560..158.844 rows=21,495 loops=3)

5. 5.415 125.728 ↓ 54.8 1,535 3 / 3

Hash Join (cost=5,936.71..26,939.68 rows=28 width=2,240) (actual time=65.530..125.728 rows=1,535 loops=3)

  • Hash Cond: ((kitchenbra5_.kitchen_brand_id)::text = (kitchenbra9_.id)::text)
6. 21.389 120.263 ↓ 3.3 31,280 3 / 3

Hash Join (cost=5,920.67..26,898.39 rows=9,558 width=1,740) (actual time=63.490..120.263 rows=31,280 loops=3)

  • Hash Cond: ((kitchenbra5_.availability_setting_id)::text = (kitchenbra7_.id)::text)
7. 20.258 98.442 ↓ 3.3 31,280 3 / 3

Hash Left Join (cost=5,891.59..26,844.07 rows=9,558 width=1,641) (actual time=63.039..98.442 rows=31,280 loops=3)

  • Hash Cond: ((kitchenbra2_.availability_setting_id)::text = (kitchenbra3_.id)::text)
8. 4.104 74.841 ↓ 2.1 5,344 3 / 3

Hash Join (cost=5,765.15..26,602.62 rows=2,590 width=1,481) (actual time=59.681..74.841 rows=5,344 loops=3)

  • Hash Cond: ((kitchenbra2_.kitchen_brand_menu_id)::text = (kitchenbra5_.id)::text)
9. 20.370 70.125 ↓ 2.1 5,344 3 / 3

Parallel Hash Join (cost=5,724.65..26,555.34 rows=2,566 width=1,223) (actual time=59.046..70.125 rows=5,344 loops=3)

  • Hash Cond: ((kitchenbra0_.kitchen_brand_menu_item_id)::text = (kitchenbra1_.id)::text)
10. 13.670 14.719 ↑ 1.2 6,876 3 / 3

Parallel Bitmap Heap Scan on kitchen_brand_menu_pos_items kitchenbra0_ (cost=757.38..19,730.14 rows=8,224 width=380) (actual time=5.044..14.719 rows=6,876 loops=3)

  • Recheck Cond: (((point_of_sale_id)::text = '798b53ed-9dc5-4f94-88a5-24b9e61d5dfe'::text) AND available)
  • Heap Blocks: exact=3,711
11. 1.049 1.049 ↓ 1.1 22,051 1 / 3

Bitmap Index Scan on idx_tmp_kitchen_brand_menu_pos_items_pos_id_available (cost=0.00..752.45 rows=19,737 width=0) (actual time=3.146..3.146 rows=22,051 loops=1)

  • Index Cond: ((point_of_sale_id)::text = '798b53ed-9dc5-4f94-88a5-24b9e61d5dfe'::text)
12. 11.629 35.036 ↑ 1.4 6,456 3 / 3

Parallel Hash (cost=3,858.86..3,858.86 rows=9,312 width=843) (actual time=35.035..35.036 rows=6,456 loops=3)

  • Buckets: 8,192 Batches: 4 Memory Usage: 3,712kB
13. 3.456 23.407 ↑ 1.4 6,456 3 / 3

Hash Join (cost=568.07..3,858.86 rows=9,312 width=843) (actual time=6.969..23.407 rows=6,456 loops=3)

  • Hash Cond: ((kitchenbra2_.kitchen_brand_menu_id)::text = (poses6_.kitchen_brand_menu_id)::text)
14. 7.125 19.557 ↑ 1.7 9,848 3 / 3

Hash Join (cost=414.47..3,659.77 rows=17,222 width=762) (actual time=6.549..19.557 rows=9,848 loops=3)

  • Hash Cond: ((kitchenbra1_.kitchen_brand_menu_category_id)::text = (kitchenbra2_.id)::text)
15. 5.933 5.933 ↑ 1.7 9,848 3 / 3

Parallel Seq Scan on kitchen_brand_menu_items kitchenbra1_ (cost=0.00..3,200.07 rows=17,222 width=504) (actual time=0.004..5.933 rows=9,848 loops=3)

  • Filter: ((state)::text = 'ACTIVE'::text)
  • Rows Removed by Filter: 7,065
16. 4.012 6.499 ↓ 1.0 7,044 3 / 3

Hash (cost=326.43..326.43 rows=7,043 width=258) (actual time=6.498..6.499 rows=7,044 loops=3)

  • Buckets: 8,192 Batches: 1 Memory Usage: 1,949kB
17. 2.487 2.487 ↓ 1.0 7,044 3 / 3

Seq Scan on kitchen_brand_menu_categories kitchenbra2_ (cost=0.00..326.43 rows=7,043 width=258) (actual time=0.008..2.487 rows=7,044 loops=3)

18. 0.094 0.394 ↓ 1.0 378 3 / 3

Hash (cost=148.91..148.91 rows=376 width=81) (actual time=0.394..0.394 rows=378 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 50kB
19. 0.252 0.300 ↓ 1.0 378 3 / 3

Bitmap Heap Scan on kitchen_brand_menu_point_of_sales poses6_ (cost=15.22..148.91 rows=376 width=81) (actual time=0.064..0.300 rows=378 loops=3)

  • Recheck Cond: ((point_of_sale_id)::text = '798b53ed-9dc5-4f94-88a5-24b9e61d5dfe'::text)
  • Filter: ((state)::text = 'ACTIVE'::text)
  • Rows Removed by Filter: 1
  • Heap Blocks: exact=123
20. 0.048 0.048 ↑ 1.0 379 3 / 3

Bitmap Index Scan on idx_19852_fk_kitchen_brand_menu_point_of_sale_extract_point_of_ (cost=0.00..15.13 rows=379 width=0) (actual time=0.048..0.048 rows=379 loops=3)

  • Index Cond: ((point_of_sale_id)::text = '798b53ed-9dc5-4f94-88a5-24b9e61d5dfe'::text)
21. 0.379 0.612 ↑ 1.0 689 3 / 3

Hash (cost=31.89..31.89 rows=689 width=258) (actual time=0.612..0.612 rows=689 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 192kB
22. 0.233 0.233 ↑ 1.0 689 3 / 3

Seq Scan on kitchen_brand_menus kitchenbra5_ (cost=0.00..31.89 rows=689 width=258) (actual time=0.007..0.233 rows=689 loops=3)

23. 1.338 3.343 ↓ 1.2 3,117 3 / 3

Hash (cost=93.45..93.45 rows=2,639 width=160) (actual time=3.343..3.343 rows=3,117 loops=3)

  • Buckets: 4,096 Batches: 1 Memory Usage: 610kB
24. 1.314 2.005 ↓ 1.2 3,117 3 / 3

Hash Right Join (cost=29.09..93.45 rows=2,639 width=160) (actual time=0.478..2.005 rows=3,117 loops=3)

  • Hash Cond: ((timeperiod4_.menu_availability_setting_id)::text = (kitchenbra3_.id)::text)
25. 0.229 0.229 ↑ 1.0 2,639 3 / 3

Seq Scan on kitchen_brand_menu_availability_time_period_settings timeperiod4_ (cost=0.00..57.39 rows=2,639 width=61) (actual time=0.008..0.229 rows=2,639 loops=3)

26. 0.244 0.462 ↑ 1.0 715 3 / 3

Hash (cost=20.15..20.15 rows=715 width=99) (actual time=0.461..0.462 rows=715 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 102kB
27. 0.218 0.218 ↑ 1.0 715 3 / 3

Seq Scan on kitchen_brand_menu_availability_settings kitchenbra3_ (cost=0.00..20.15 rows=715 width=99) (actual time=0.011..0.218 rows=715 loops=3)

28. 0.242 0.432 ↑ 1.0 715 3 / 3

Hash (cost=20.15..20.15 rows=715 width=99) (actual time=0.432..0.432 rows=715 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 102kB
29. 0.190 0.190 ↑ 1.0 715 3 / 3

Seq Scan on kitchen_brand_menu_availability_settings kitchenbra7_ (cost=0.00..20.15 rows=715 width=99) (actual time=0.008..0.190 rows=715 loops=3)

30. 0.004 0.050 ↑ 2.0 1 3 / 3

Hash (cost=16.01..16.01 rows=2 width=500) (actual time=0.050..0.050 rows=1 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
31. 0.009 0.046 ↑ 2.0 1 3 / 3

Bitmap Heap Scan on kitchen_brands kitchenbra9_ (cost=9.38..16.01 rows=2 width=500) (actual time=0.046..0.046 rows=1 loops=3)

  • Recheck Cond: (((brand_id)::text = '60817b2f-b570-434a-968e-6b0b6f98c2a3'::text) AND ((kitchen_id)::text = 'f5244760-1a78-4b30-a0d4-db2177345e60'::text))
  • Heap Blocks: exact=1
32. 0.003 0.037 ↓ 0.0 0 3 / 3

BitmapAnd (cost=9.38..9.38 rows=2 width=0) (actual time=0.037..0.037 rows=0 loops=3)

33. 0.018 0.018 ↑ 1.0 20 3 / 3

Bitmap Index Scan on idx_19885_fk_kitchen_brand_brands (cost=0.00..4.43 rows=20 width=0) (actual time=0.018..0.018 rows=20 loops=3)

  • Index Cond: ((brand_id)::text = '60817b2f-b570-434a-968e-6b0b6f98c2a3'::text)
34. 0.016 0.016 ↑ 1.1 54 3 / 3

Bitmap Index Scan on idx_19885_fk_kitchen_brand_kitchens (cost=0.00..4.70 rows=57 width=0) (actual time=0.016..0.016 rows=54 loops=3)

  • Index Cond: ((kitchen_id)::text = 'f5244760-1a78-4b30-a0d4-db2177345e60'::text)
35. 18.424 18.424 ↓ 1.3 14 4,606 / 3

Index Scan using idx_19783_fk_kbm_time_perios_setting_kbm_availability_setting on kitchen_brand_menu_availability_time_period_settings timeperiod8_ (cost=0.28..0.76 rows=11 width=61) (actual time=0.009..0.012 rows=14 loops=4,606)

  • Index Cond: ((kitchenbra7_.id)::text = (menu_availability_setting_id)::text)
Planning time : 18.113 ms
Execution time : 1,270.770 ms