explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PN14

Settings
# exclusive inclusive rows x rows loops node
1. 96.384 244.859 ↓ 252.9 64,484 1

Gather (cost=6,967.18..28,061.71 rows=255 width=2,608) (actual time=70.341..244.859 rows=64,484 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
2. 13.986 148.475 ↓ 202.8 21,495 3 / 3

Nested Loop Left Join (cost=5,967.18..27,036.21 rows=106 width=2,608) (actual time=63.924..148.475 rows=21,495 loops=3)

3. 5.001 122.206 ↓ 52.9 1,535 3 / 3

Hash Join (cost=5,966.90..27,010.88 rows=29 width=2,240) (actual time=63.897..122.206 rows=1,535 loops=3)

  • Hash Cond: ((kitchenbra5_.kitchen_brand_id)::text = (kitchenbra9_.id)::text)
4. 21.618 117.151 ↓ 3.2 31,280 3 / 3

Hash Join (cost=5,950.86..26,969.24 rows=9,695 width=1,740) (actual time=62.701..117.151 rows=31,280 loops=3)

  • Hash Cond: ((kitchenbra5_.availability_setting_id)::text = (kitchenbra7_.id)::text)
5. 18.927 95.053 ↓ 3.2 31,280 3 / 3

Hash Left Join (cost=5,921.77..26,914.55 rows=9,695 width=1,641) (actual time=62.197..95.053 rows=31,280 loops=3)

  • Hash Cond: ((kitchenbra2_.availability_setting_id)::text = (kitchenbra3_.id)::text)
6. 3.670 73.062 ↓ 2.0 5,344 3 / 3

Hash Join (cost=5,795.34..26,671.45 rows=2,627 width=1,481) (actual time=59.120..73.062 rows=5,344 loops=3)

  • Hash Cond: ((kitchenbra2_.kitchen_brand_menu_id)::text = (kitchenbra5_.id)::text)
7. 19.704 68.783 ↓ 2.1 5,344 3 / 3

Parallel Hash Join (cost=5,754.83..26,624.07 rows=2,602 width=1,223) (actual time=58.489..68.783 rows=5,344 loops=3)

  • Hash Cond: ((kitchenbra0_.kitchen_brand_menu_item_id)::text = (kitchenbra1_.id)::text)
8. 13.355 14.401 ↑ 1.2 6,876 3 / 3

Parallel Bitmap Heap Scan on kitchen_brand_menu_pos_items kitchenbra0_ (cost=787.57..19,786.22 rows=8,341 width=380) (actual time=5.033..14.401 rows=6,876 loops=3)

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

Bitmap Index Scan on idx_tmp_kitchen_brand_menu_pos_items_pos_id_available (cost=0.00..782.56 rows=20,019 width=0) (actual time=3.139..3.139 rows=22,284 loops=1)

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

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

  • Buckets: 8,192 Batches: 4 Memory Usage: 3,712kB
11. 3.498 23.167 ↑ 1.4 6,456 3 / 3

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

  • Hash Cond: ((kitchenbra2_.kitchen_brand_menu_id)::text = (poses6_.kitchen_brand_menu_id)::text)
12. 6.866 19.264 ↑ 1.7 9,848 3 / 3

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

  • Hash Cond: ((kitchenbra1_.kitchen_brand_menu_category_id)::text = (kitchenbra2_.id)::text)
13. 5.983 5.983 ↑ 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.983 rows=9,848 loops=3)

  • Filter: ((state)::text = 'ACTIVE'::text)
  • Rows Removed by Filter: 7,065
14. 3.990 6.415 ↓ 1.0 7,044 3 / 3

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

  • Buckets: 8,192 Batches: 1 Memory Usage: 1,949kB
15. 2.425 2.425 ↓ 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.010..2.425 rows=7,044 loops=3)

16. 0.094 0.405 ↓ 1.0 378 3 / 3

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 50kB
17. 0.263 0.311 ↓ 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.311 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
18. 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)
19. 0.375 0.609 ↑ 1.0 689 3 / 3

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 192kB
20. 0.234 0.234 ↑ 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.234 rows=689 loops=3)

21. 1.250 3.064 ↓ 1.2 3,117 3 / 3

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

  • Buckets: 4,096 Batches: 1 Memory Usage: 610kB
22. 1.230 1.814 ↓ 1.2 3,117 3 / 3

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

  • Hash Cond: ((timeperiod4_.menu_availability_setting_id)::text = (kitchenbra3_.id)::text)
23. 0.205 0.205 ↑ 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.007..0.205 rows=2,639 loops=3)

24. 0.207 0.379 ↑ 1.0 715 3 / 3

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 102kB
25. 0.172 0.172 ↑ 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.008..0.172 rows=715 loops=3)

26. 0.269 0.480 ↑ 1.0 715 3 / 3

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 102kB
27. 0.211 0.211 ↑ 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.009..0.211 rows=715 loops=3)

28. 0.005 0.054 ↑ 2.0 1 3 / 3

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
29. 0.008 0.049 ↑ 2.0 1 3 / 3

Bitmap Heap Scan on kitchen_brands kitchenbra9_ (cost=9.38..16.01 rows=2 width=500) (actual time=0.049..0.049 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
30. 0.003 0.041 ↓ 0.0 0 3 / 3

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

31. 0.019 0.019 ↑ 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.019..0.019 rows=20 loops=3)

  • Index Cond: ((brand_id)::text = '60817b2f-b570-434a-968e-6b0b6f98c2a3'::text)
32. 0.019 0.019 ↑ 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.019..0.019 rows=54 loops=3)

  • Index Cond: ((kitchen_id)::text = 'f5244760-1a78-4b30-a0d4-db2177345e60'::text)
33. 12.283 12.283 ↓ 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.005..0.008 rows=14 loops=4,606)

  • Index Cond: ((kitchenbra7_.id)::text = (menu_availability_setting_id)::text)
Planning time : 7.389 ms
Execution time : 249.909 ms