explain.depesz.com

PostgreSQL's explain analyze made readable

Result: z4fp

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

Limit (cost=6,764.44..6,764.45 rows=3 width=698) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=6,764.44..6,764.45 rows=3 width=698) (actual rows= loops=)

  • Sort Key: (('12742'::double precision * asin(sqrt((power(sin((((('49.4464909'::double precision - artisans.latitude) * '3.14159265358979'::double precision) / '180'::double precision) / '2'::double precision)), '2'::double precision) + (('0.650157915722783'::double precision * cos(((artisans.latitude * '3.14159265358979'::double precision) / '180'::double precision))) * power(sin((((('1.0976001'::double precision - artisans.longitude) * '3.14159265358979'::double precision) / '180'::double precision) / '2'::double precision)), '2'::double precision)))))))
3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=638.62..6,764.42 rows=3 width=698) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Nested Loop Semi Join (cost=638.20..6,738.85 rows=3 width=658) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on artisans (cost=633.03..5,827.52 rows=24 width=658) (actual rows= loops=)

  • Recheck Cond: ((latitude >= '48.5471692940813'::double precision) AND (latitude <= '50.3458125059187'::double precision) AND (longitude >= '-0.285635548094742'::double precision) AND (longitude <= '2.48083574809474'::double precision))
  • Filter: ((('12742'::double precision * asin(sqrt((power(sin((((('49.4464909'::double precision - latitude) * '3.14159265358979'::double precision) / '180'::double precision) / '2'::double precision)), '2'::double precision) + (('0.650157915722783'::double precision * cos(((latitude * '3.14159265358979'::double precision) / '180'::double precision))) * power(sin((((('1.0976001'::double precision - longitude) * '3.14159265358979'::double precision) / '180'::double precision) / '2'::double precision)), '2'::double precision)))))) >= '0'::double precision) AND (('12742'::double precision * asin(sqrt((power(sin((((('49.4464909'::double precision - latitude) * '3.14159265358979'::double precision) / '180'::double precision) / '2'::double precision)), '2'::double precision) + (('0.650157915722783'::double precision * cos(((latitude * '3.14159265358979'::double precision) / '180'::double precision))) * power(sin((((('1.0976001'::double precision - longitude) * '3.14159265358979'::double precision) / '180'::double precision) / '2'::double precision)), '2'::double precision)))))) <= '100'::double precision))
6. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on index_artisans_on_latitude_and_longitude (cost=0.00..633.03 rows=4,885 width=0) (actual rows= loops=)

  • Index Cond: ((latitude >= '48.5471692940813'::double precision) AND (latitude <= '50.3458125059187'::double precision) AND (longitude >= '-0.285635548094742'::double precision) AND (longitude <= '2.48083574809474'::double precision))
7. 0.000 0.000 ↓ 0.0

Nested Loop Semi Join (cost=5.17..37.96 rows=1 width=16) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop Semi Join (cost=4.76..36.59 rows=1 width=48) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on qualifications_obtenues (cost=4.48..35.98 rows=2 width=32) (actual rows= loops=)

  • Recheck Cond: (artisan_id = artisans.id)
  • Filter: ((date_debut <= '2019-02-11'::date) AND (date_fin >= '2019-02-11'::date))
10. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on index_qualifications_obtenues_on_artisan_id (cost=0.00..4.48 rows=8 width=0) (actual rows= loops=)

  • Index Cond: (artisan_id = artisans.id)
11. 0.000 0.000 ↓ 0.0

Index Only Scan using index_operations_qualifications_on_qualification_id on operations_qualifications (cost=0.28..0.33 rows=3 width=16) (actual rows= loops=)

  • Index Cond: (qualification_id = qualifications_obtenues.qualification_id)
12. 0.000 0.000 ↓ 0.0

Nested Loop Semi Join (cost=0.41..0.88 rows=1 width=16) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Index Scan using index_operations_qualifications_on_qualification_id on operations_qualifications operations_qualifications_1 (cost=0.28..0.33 rows=3 width=32) (actual rows= loops=)

  • Index Cond: (qualification_id = qualifications_obtenues.qualification_id)
14. 0.000 0.000 ↓ 0.0

Index Scan using index_types_travaux_on_operation_id on types_travaux (cost=0.14..0.17 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (operation_id = operations_qualifications_1.operation_id)
  • Filter: ((slug)::text = 'chaudiere-a-bois'::text)
15. 0.000 0.000 ↓ 0.0

Index Scan using entreprises_pkey on entreprises (cost=0.42..8.44 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (id = artisans.entreprise_id)
  • Filter: ((etat_administratif)::text = 'Active'::text)