explain.depesz.com

PostgreSQL's explain analyze made readable

Result: B7Pg

Settings
# exclusive inclusive rows x rows loops node
1. 0.113 89.221 ↓ 500.0 500 1

Limit (cost=12,517.31..12,517.43 rows=1 width=382) (actual time=84.497..89.221 rows=500 loops=1)

2. 0.000 89.108 ↓ 3.0 1,000 1

Gather Merge (cost=12,479.04..12,517.31 rows=328 width=382) (actual time=84.010..89.108 rows=1,000 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 8.538 233.166 ↓ 3.0 487 3

Sort (cost=11,479.02..11,479.43 rows=164 width=382) (actual time=77.636..77.722 rows=487 loops=3)

  • Sort Key: bookings.id
  • Sort Method: quicksort Memory: 1232kB
4. 5.031 224.628 ↓ 12.6 2,072 3

Hash Join (cost=66.14..11,472.98 rows=164 width=382) (actual time=1.424..74.876 rows=2,072 loops=3)

  • Hash Cond: (bookings.client_id = clients.id)
5. 21.528 216.102 ↓ 12.7 2,085 3

Nested Loop Semi Join (cost=0.42..11,406.83 rows=164 width=382) (actual time=0.138..72.034 rows=2,085 loops=3)

6. 99.402 99.402 ↓ 12.8 5,287 3

Parallel Seq Scan on bookings (cost=0.00..8,411.86 rows=412 width=382) (actual time=0.018..33.134 rows=5,287 loops=3)

  • Filter: ((deleted_at IS NULL) AND ((start)::date >= '2019-09-01'::date) AND ((start)::date <= '2019-10-03'::date))
  • Rows Removed by Filter: 60517
7. 15.862 95.172 ↓ 0.0 0 15,862

Nested Loop (cost=0.42..7.26 rows=1 width=16) (actual time=0.006..0.006 rows=0 loops=15,862)

8. 15.862 15.862 ↑ 1.0 1 15,862

Seq Scan on teams (cost=0.00..1.05 rows=1 width=90) (actual time=0.001..0.001 rows=1 loops=15,862)

  • Filter: ((deleted_at IS NULL) AND ((id)::text = '8b579d17-dd73-42aa-9679-10e59f921a74'::text))
  • Rows Removed by Filter: 3
9. 63.448 63.448 ↓ 0.0 0 15,862

Index Scan using booking_teams_booking_id_index on booking_teams (cost=0.42..6.20 rows=1 width=53) (actual time=0.004..0.004 rows=0 loops=15,862)

  • Index Cond: (booking_id = bookings.id)
  • Filter: ((team_id)::text = '8b579d17-dd73-42aa-9679-10e59f921a74'::text)
  • Rows Removed by Filter: 1
10. 0.984 3.495 ↑ 1.0 1,232 3

Hash (cost=50.32..50.32 rows=1,232 width=16) (actual time=1.165..1.165 rows=1,232 loops=3)

  • Buckets: 2048 Batches: 1 Memory Usage: 74kB
11. 2.511 2.511 ↑ 1.0 1,232 3

Seq Scan on clients (cost=0.00..50.32 rows=1,232 width=16) (actual time=0.152..0.837 rows=1,232 loops=3)

Planning time : 0.988 ms
Execution time : 89.351 ms