explain.depesz.com

PostgreSQL's explain analyze made readable

Result: aRB2

Settings
# exclusive inclusive rows x rows loops node
1. 4.627 5.350 ↑ 1.0 1 1

Aggregate (cost=229,839.42..229,839.43 rows=1 width=8) (actual time=5.350..5.350 rows=1 loops=1)

  • Filter: (count(mis.id) > 1)
2. 0.101 0.723 ↓ 4.8 500 1

Nested Loop (cost=1.71..229,838.90 rows=104 width=1,705) (actual time=0.038..0.723 rows=500 loops=1)

3. 0.014 0.222 ↓ 2.1 100 1

Nested Loop (cost=1.14..175.79 rows=47 width=1,705) (actual time=0.032..0.222 rows=100 loops=1)

4. 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))
5. 0.198 0.198 ↑ 4.0 100 1

Index Scan using check__openeddate_day_id on "Check" c (cost=0.57..163.16 rows=405 width=1,713) (actual time=0.020..0.198 rows=100 loops=1)

  • Index Cond: (openeddate_day_id = d.id)
6. 0.400 0.400 ↑ 1,125.8 5 100

Index Scan using menuitemselection__check_id3 on "MenuItemSelection" mis (cost=0.58..4,830.16 rows=5,629 width=16) (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.438 ms
Execution time : 5.395 ms