explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vCHl

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

GroupAggregate (cost=13,835.69..13,841.27 rows=113 width=81) (actual rows= loops=)

  • Group Key: anns.id_ann
2. 0.000 0.000 ↓ 0.0

Sort (cost=13,835.69..13,836.29 rows=240 width=9) (actual rows= loops=)

  • Sort Key: anns.id_ann
3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.85..13,826.20 rows=240 width=9) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Seq Scan on anns (cost=0.00..12.40 rows=120 width=240) (actual rows= loops=)

  • Filter: pro
5. 0.000 0.000 ↓ 0.0

Append (cost=0.85..115.10 rows=2 width=5) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 1 (cost=0.85..57.55 rows=1 width=5) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.85..57.54 rows=1 width=9) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Index Scan using annonce_int4range_date_part_km_id_modele_id_energie_id_boit_idx on annonce a (cost=0.42..2.67 rows=1 width=8) (actual rows= loops=)

  • Index Cond: ((int4range(CASE WHEN (prix[array_length(prix, 1)] < 5000) THEN (floor(((prix[array_length(prix, 1)])::numeric * 0.93)))::integer WHEN ((prix[array_length(prix, 1)] >= 5000) AND (prix[array_length(prix, 1)] < 15000)) THEN (floor(((prix[array_length(prix, 1)])::numeric * 0.95)))::integer ELSE (floor(((prix[array_length(prix, 1)])::numeric * 0.97)))::integer END, CASE WHEN (prix[array_length(prix, 1)] < 5000) THEN (ceiling(((prix[array_length(prix, 1)])::numeric * 1.07)))::integer WHEN ((prix[array_length(prix, 1)] >= 5000) AND (prix[array_length(prix, 1)] < 15000)) THEN (ceiling(((prix[array_length(prix, 1)])::numeric * 1.05)))::integer ELSE (ceiling(((prix[array_length(prix, 1)])::numeric * 1.03)))::integer END) @> (anns.prix)[array_length(anns.prix, 1)]) AND (date_part('year'::text, (dt_mec)::timestamp without time zone) = date_part('year'::text, (anns.dt_mec)::timestamp without time zone)) AND (km = anns.km) AND (id_modele = anns.id_modele) AND (id_energie = anns.id_energie) AND (id_boite = anns.id_boite))
  • Filter: ((id_ann < anns.id_ann) AND CASE WHEN (anns.couleur IS NOT NULL) THEN (((couleur)::text = (anns.couleur)::text) OR (couleur IS NULL)) ELSE true END AND CASE WHEN (anns.cylindre IS NOT NULL) THEN (((cylindre)::text = (anns.cylindre)::text) OR (cylindre IS NULL)) ELSE true END AND CASE WHEN (anns.puissance IS NOT NULL) THEN ((puissance = anns.puissance) OR (puissance IS NULL)) ELSE true END AND CASE WHEN (anns.finition IS NOT NULL) THEN (((finition)::text = (anns.finition)::text) OR (finition IS NULL)) ELSE true END AND CASE WHEN (id_tgeneration IS NOT NULL) THEN (id_tgeneration = anns.id_tgeneration) ELSE true END AND ((url)::text <> (anns.url)::text) AND (id_site_source = anns.id_site_source))
9. 0.000 0.000 ↓ 0.0

Index Scan using geographie_pkey on geographie g (cost=0.42..27.65 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id_geographie = a.id_geographie)
  • Filter: ((id_pays = anns.id_pays) AND st_dwithin(location, anns.location, '10000'::double precision, false))
10. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 2 (cost=0.85..57.54 rows=1 width=5) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.85..57.53 rows=1 width=9) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Index Scan using annonce_int4range_date_part_km_id_modele_id_energie_id_boit_idx on annonce a_1 (cost=0.42..2.66 rows=1 width=8) (actual rows= loops=)

  • Index Cond: ((int4range(CASE WHEN (prix[array_length(prix, 1)] < 5000) THEN (floor(((prix[array_length(prix, 1)])::numeric * 0.93)))::integer WHEN ((prix[array_length(prix, 1)] >= 5000) AND (prix[array_length(prix, 1)] < 15000)) THEN (floor(((prix[array_length(prix, 1)])::numeric * 0.95)))::integer ELSE (floor(((prix[array_length(prix, 1)])::numeric * 0.97)))::integer END, CASE WHEN (prix[array_length(prix, 1)] < 5000) THEN (ceiling(((prix[array_length(prix, 1)])::numeric * 1.07)))::integer WHEN ((prix[array_length(prix, 1)] >= 5000) AND (prix[array_length(prix, 1)] < 15000)) THEN (ceiling(((prix[array_length(prix, 1)])::numeric * 1.05)))::integer ELSE (ceiling(((prix[array_length(prix, 1)])::numeric * 1.03)))::integer END) @> (anns.prix)[array_length(anns.prix, 1)]) AND (date_part('year'::text, (dt_mec)::timestamp without time zone) = date_part('year'::text, (anns.dt_mec)::timestamp without time zone)) AND (km = anns.km) AND (id_modele = anns.id_modele) AND (id_energie = anns.id_energie) AND (id_boite = anns.id_boite))
  • Filter: ((id_ann < anns.id_ann) AND (id_site_source <> anns.id_site_source))
13. 0.000 0.000 ↓ 0.0

Index Scan using geographie_pkey on geographie g_1 (cost=0.42..27.65 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id_geographie = a_1.id_geographie)