explain.depesz.com

PostgreSQL's explain analyze made readable

Result: w8Yo

Settings
# exclusive inclusive rows x rows loops node
1. 0.009 0.623 ↑ 1.0 1 1

Aggregate (cost=1,355,824.56..1,355,824.57 rows=1 width=8) (actual time=0.623..0.623 rows=1 loops=1)

2. 0.013 0.614 ↓ 6.2 100 1

Nested Loop (cost=1.14..1,355,824.52 rows=16 width=0) (actual time=0.040..0.614 rows=100 loops=1)

3. 0.010 0.010 ↑ 1.0 1 1

Index Scan using "Day_restaurant_id_yyyymmdd_key" on "Day" d (cost=0.56..8.58 rows=1 width=8) (actual time=0.009..0.010 rows=1 loops=1)

  • Index Cond: ((restaurant_id = '2703000000000000'::bigint) AND (yyyymmdd = 20200325))
4. 0.091 0.591 ↑ 1.4 100 1

Index Scan using check__openeddate_day_id on "Check" c (cost=0.57..1,355,814.59 rows=135 width=8) (actual time=0.029..0.591 rows=100 loops=1)

  • Index Cond: (openeddate_day_id = d.id)
  • Filter: ((SubPlan 1) > 1)
5.          

SubPlan (for Index Scan)

6. 0.100 0.500 ↑ 1.0 1 100

Aggregate (cost=3,347.27..3,347.28 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=100)

7. 0.400 0.400 ↑ 1,125.8 5 100

Index Scan using menuitemselection__check_id3 on "MenuItemSelection" mis (cost=0.58..3,333.20 rows=5,629 width=0) (actual time=0.002..0.004 rows=5 loops=100)

  • Index Cond: (check_id = c.id)
  • Filter: ((NOT deleted) AND (NOT voided) AND (parent_id IS NULL) AND (status <> 3))
  • Rows Removed by Filter: 1
Planning time : 0.356 ms
Execution time : 0.664 ms