explain.depesz.com

PostgreSQL's explain analyze made readable

Result: TdhK

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 608.557 ↓ 1.2 1,135 1

Gather Merge (cost=81,083.70..81,190.53 rows=929 width=335) (actual time=607.001..608.557 rows=1,135 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
2. 2.472 1,207.590 ↑ 1.6 568 2

Sort (cost=80,083.69..80,086.01 rows=929 width=335) (actual time=603.727..603.795 rows=568 loops=2)

  • Sort Key: items."updatedAt" DESC
  • Sort Method: quicksort Memory: 422kB
3. 1.441 1,205.118 ↑ 1.6 568 2

Nested Loop (cost=50.05..80,037.89 rows=929 width=335) (actual time=2.387..602.559 rows=568 loops=2)

4. 38.940 40.892 ↑ 1.7 578 2

Parallel Bitmap Heap Scan on "order" orders (cost=49.48..6,621.79 rows=980 width=12) (actual time=1.064..20.446 rows=578 loops=2)

  • Recheck Cond: ("userId" = 687666)
  • Heap Blocks: exact=579
5. 1.952 1.952 ↑ 1.4 1,172 1

Bitmap Index Scan on "payment_Order_userId" (cost=0.00..49.06 rows=1,666 width=0) (actual time=1.952..1.952 rows=1,172 loops=1)

  • Index Cond: ("userId" = 687666)
6. 1,162.785 1,162.785 ↑ 22.0 1 1,157

Index Scan using "orderItem_OrderItem_orderId" on "orderItem" items (cost=0.57..74.69 rows=22 width=327) (actual time=0.902..1.005 rows=1 loops=1,157)

  • Index Cond: ("orderId" = orders."orderId")
  • Filter: (type = ANY ('{transfer,recharge,topup}'::"enum_orderItem_type"[]))
  • Rows Removed by Filter: 1