QUERY PLAN
GroupAggregate (cost=0.56..49.47 rows=1 width=12)
Group Key: c.id
-> Nested Loop Left Join (cost=0.56..49.45 rows=1 width=24)
-> Nested Loop Left Join (cost=0.28..41.15 rows=1 width=8)
Join Filter: (car.client_id = c.id)
-> Index Scan using tbl_clients_pkey on tbl_clients c (cost=0.28..8.29 rows=1 width=4)
Index Cond: (id = 2815)
Filter: (NOT deleted)
-> Seq Scan on tbl_client_address_rels car (cost=0.00..32.84 rows=1 width=8)
Filter: (client_id = 2815)
-> Index Scan using tbl_addresses_pkey on tbl_addresses ad (cost=0.28..8.30 rows=1 width=20)
Index Cond: (id = car.address_id)