explain.depesz.com

PostgreSQL's explain analyze made readable

Result: a5c3

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Limit (cost=1,064.41..5,619.28 rows=50 width=194) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Merge Semi Join (cost=1,064.41..2,678,963.88 rows=29,396 width=194) (actual rows= loops=)

  • Merge Cond: (_.id = booked_room.request_id)
3. 0.000 0.000 ↓ 0.0

Index Scan Backward using request_pkey on request _ (cost=0.43..222,161.41 rows=1,653,496 width=162) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Gather Merge (cost=1,001.30..1,645,492.75 rows=29,396 width=8) (actual rows= loops=)

  • Workers Planned: 2
5. 0.000 0.000 ↓ 0.0

Nested Loop Semi Join (cost=1.28..1,641,099.69 rows=12,248 width=8) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Parallel Index Scan Backward using aix_61be2aa3eed960a03f7809b8696502a0 on booked_room (cost=0.42..53,680.13 rows=283,506 width=16) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.85..5.59 rows=1 width=8) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Index Scan using aix_4b88b957d30c0f5b895f400847c002ef on booked_room_guest brg (cost=0.43..0.70 rows=3 width=16) (actual rows= loops=)

  • Index Cond: (booked_room_id = booked_room.id)
9. 0.000 0.000 ↓ 0.0

Index Scan using guest_pkey on guest __1 (cost=0.43..1.63 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = brg.guest_id)
  • Filter: ((((setweight(to_tsvector('simple'::regconfig, upper(surname)), 'A'::""char"") || setweight(to_tsvector('simple'::regconfig, upper(name)), 'B'::""char"")) || setweight(to_tsvector('simple'::regconfig, COALESCE(upper(d_serial), ''::text)), 'C'::""char"")) || setweight(to_tsvector('simple'::regconfig, COALESCE(upper(d_number), ''::text)), 'A'::""char"")) @@ '''гадиатулин'':*'::tsquery)
10.          

SubPlan (for Merge Semi Join)

11. 0.000 0.000 ↓ 0.0

Aggregate (cost=27.43..27.45 rows=1 width=32) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.85..27.23 rows=4 width=56) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Index Scan using aix_61be2aa3eed960a03f7809b8696502a0 on booked_room br (cost=0.42..8.78 rows=2 width=28) (actual rows= loops=)

  • Index Cond: (request_id = _.id)
14. 0.000 0.000 ↓ 0.0

Index Scan using aix_4b88b957d30c0f5b895f400847c002ef on booked_room_guest brg_1 (cost=0.43..9.20 rows=3 width=36) (actual rows= loops=)

  • Index Cond: (booked_room_id = br.id)