explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2sVV

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

GroupAggregate (cost=34,429.54..34,433.93 rows=119 width=68) (actual rows= loops=)

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

Sort (cost=34,429.54..34,430.19 rows=260 width=9) (actual rows= loops=)

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

Nested Loop (cost=1.11..34,419.11 rows=260 width=9) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Seq Scan on anns (cost=0.00..12.60 rows=130 width=144) (actual rows= loops=)

  • Filter: pro
5. 0.000 0.000 ↓ 0.0

Append (cost=1.11..264.65 rows=2 width=5) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

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

7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.11..57.80 rows=1 width=9) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Index Scan using annonce_date_part_id_modele_id_boite_id_energie_prix_km_idx on annonce a (cost=0.69..2.93 rows=1 width=8) (actual rows= loops=)

  • Index Cond: ((date_part('year'::text, (dt_mec)::timestamp without time zone) = date_part('year'::text, (anns.dt_mec)::timestamp without time zone)) AND (id_modele = anns.id_modele) AND (id_boite = anns.id_boite) AND (id_energie = anns.id_energie) AND (prix[array_length(prix, 1)] >= CASE WHEN ((anns.prix)[array_length(anns.prix, 1)] < 0) THEN 0 WHEN (((anns.prix)[array_length(anns.prix, 1)] >= 0) AND ((anns.prix)[array_length(anns.prix, 1)] < 10000)) THEN (floor((0.99 * ((anns.prix)[array_length(anns.prix, 1)])::numeric)))::integer ELSE ((anns.prix)[array_length(anns.prix, 1)] - 100) END) AND (prix[array_length(prix, 1)] <= CASE WHEN ((anns.prix)[array_length(anns.prix, 1)] < 0) THEN 0 WHEN (((anns.prix)[array_length(anns.prix, 1)] >= 0) AND ((anns.prix)[array_length(anns.prix, 1)] < 10000)) THEN (ceiling((1.01 * ((anns.prix)[array_length(anns.prix, 1)])::numeric)))::integer ELSE ((anns.prix)[array_length(anns.prix, 1)] + 100) END) AND (km >= CASE WHEN ((anns.id_site_source <> 18) AND (anns.km < 0)) THEN 0 WHEN ((anns.id_site_source <> 18) AND (anns.km >= 0) AND (anns.km < 10000)) THEN (floor((0.99 * (anns.km)::numeric)))::integer WHEN ((anns.id_site_source <> 18) AND (anns.km >= 10,000)) THEN (anns.km - 100) ELSE NULL::integer END) AND (km <= CASE WHEN ((anns.id_site_source <> 18) AND (anns.km < 0)) THEN 0 WHEN ((anns.id_site_source <> 18) AND (anns.km >= 0) AND (anns.km < 10000)) THEN (ceiling((1.01 * (anns.km)::numeric)))::integer WHEN ((anns.id_site_source <> 18) AND (anns.km >= 10,000)) THEN (anns.km + 100) ELSE NULL::integer END))
  • Filter: ((id_ann < anns.id_ann) 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=152.18..206.83 rows=1 width=5) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Nested Loop (cost=152.18..206.82 rows=1 width=9) (actual rows= loops=)

  • Join Filter: (a_1.id_geographie = g_1.id_geographie)
12. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on geographie g_1 (cost=151.63..177.74 rows=1 width=4) (actual rows= loops=)

  • Recheck Cond: (id_pays = anns.id_pays)
  • Filter: st_dwithin(location, anns.location, '10000'::double precision, false)
13. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=151.63..151.63 rows=1 width=0) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on index_location (cost=0.00..2.15 rows=68 width=0) (actual rows= loops=)

  • Index Cond: (location && _st_expand(anns.location, '10000'::double precision))
15. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on geographie_id_pays_idx (cost=0.00..149.23 rows=14,121 width=0) (actual rows= loops=)

  • Index Cond: (id_pays = anns.id_pays)
16. 0.000 0.000 ↓ 0.0

Append (cost=0.55..28.96 rows=10 width=8) (actual rows= loops=)

  • Subplans Removed: 1
17. 0.000 0.000 ↓ 0.0

Index Scan using annonce_dead_partition_2012_date_part_id_modele_id_boite_id_idx on annonce_dead_partition_2012 a_1 (cost=0.55..2.81 rows=1 width=8) (actual rows= loops=)

  • Index Cond: ((date_part('year'::text, (dt_mec)::timestamp without time zone) = date_part('year'::text, (anns.dt_mec)::timestamp without time zone)) AND (id_modele = anns.id_modele) AND (id_boite = anns.id_boite) AND (id_energie = anns.id_energie) AND (prix[array_length(prix, 1)] >= CASE WHEN ((anns.prix)[array_length(anns.prix, 1)] < 0) THEN 0 WHEN (((anns.prix)[array_length(anns.prix, 1)] >= 0) AND ((anns.prix)[array_length(anns.prix, 1)] < 10000)) THEN (floor((0.99 * ((anns.prix)[array_length(anns.prix, 1)])::numeric)))::integer ELSE ((anns.prix)[array_length(anns.prix, 1)] - 100) END) AND (prix[array_length(prix, 1)] <= CASE WHEN ((anns.prix)[array_length(anns.prix, 1)] < 0) THEN 0 WHEN (((anns.prix)[array_length(anns.prix, 1)] >= 0) AND ((anns.prix)[array_length(anns.prix, 1)] < 10000)) THEN (ceiling((1.01 * ((anns.prix)[array_length(anns.prix, 1)])::numeric)))::integer ELSE ((anns.prix)[array_length(anns.prix, 1)] + 100) END) AND (km >= CASE WHEN ((anns.id_site_source <> 18) AND (anns.km < 0)) THEN 0 WHEN ((anns.id_site_source <> 18) AND (anns.km >= 0) AND (anns.km < 10000)) THEN (floor((0.99 * (anns.km)::numeric)))::integer WHEN ((anns.id_site_source <> 18) AND (anns.km >= 10,000)) THEN (anns.km - 100) ELSE NULL::integer END) AND (km <= CASE WHEN ((anns.id_site_source <> 18) AND (anns.km < 0)) THEN 0 WHEN ((anns.id_site_source <> 18) AND (anns.km >= 0) AND (anns.km < 10000)) THEN (ceiling((1.01 * (anns.km)::numeric)))::integer WHEN ((anns.id_site_source <> 18) AND (anns.km >= 10,000)) THEN (anns.km + 100) ELSE NULL::integer END))
  • Filter: ((id_ann < anns.id_ann) AND (id_site_source <> anns.id_site_source) AND (dt_dead >= (anns.dt_annonce)[1]) AND (dt_dead >= (anns.dt_check - '90 days'::interval)) AND (dt_dead <= now()))
18. 0.000 0.000 ↓ 0.0

Index Scan using annonce_dead_partition_2013_date_part_id_modele_id_boite_id_idx on annonce_dead_partition_2013 a_2 (cost=0.69..2.94 rows=1 width=8) (actual rows= loops=)

  • Index Cond: ((date_part('year'::text, (dt_mec)::timestamp without time zone) = date_part('year'::text, (anns.dt_mec)::timestamp without time zone)) AND (id_modele = anns.id_modele) AND (id_boite = anns.id_boite) AND (id_energie = anns.id_energie) AND (prix[array_length(prix, 1)] >= CASE WHEN ((anns.prix)[array_length(anns.prix, 1)] < 0) THEN 0 WHEN (((anns.prix)[array_length(anns.prix, 1)] >= 0) AND ((anns.prix)[array_length(anns.prix, 1)] < 10000)) THEN (floor((0.99 * ((anns.prix)[array_length(anns.prix, 1)])::numeric)))::integer ELSE ((anns.prix)[array_length(anns.prix, 1)] - 100) END) AND (prix[array_length(prix, 1)] <= CASE WHEN ((anns.prix)[array_length(anns.prix, 1)] < 0) THEN 0 WHEN (((anns.prix)[array_length(anns.prix, 1)] >= 0) AND ((anns.prix)[array_length(anns.prix, 1)] < 10000)) THEN (ceiling((1.01 * ((anns.prix)[array_length(anns.prix, 1)])::numeric)))::integer ELSE ((anns.prix)[array_length(anns.prix, 1)] + 100) END) AND (km >= CASE WHEN ((anns.id_site_source <> 18) AND (anns.km < 0)) THEN 0 WHEN ((anns.id_site_source <> 18) AND (anns.km >= 0) AND (anns.km < 10000)) THEN (floor((0.99 * (anns.km)::numeric)))::integer WHEN ((anns.id_site_source <> 18) AND (anns.km >= 10,000)) THEN (anns.km - 100) ELSE NULL::integer END) AND (km <= CASE WHEN ((anns.id_site_source <> 18) AND (anns.km < 0)) THEN 0 WHEN ((anns.id_site_source <> 18) AND (anns.km >= 0) AND (anns.km < 10000)) THEN (ceiling((1.01 * (anns.km)::numeric)))::integer WHEN ((anns.id_site_source <> 18) AND (anns.km >= 10,000)) THEN (anns.km + 100) ELSE NULL::integer END))
  • Filter: ((id_ann < anns.id_ann) AND (id_site_source <> anns.id_site_source) AND (dt_dead >= (anns.dt_annonce)[1]) AND (dt_dead >= (anns.dt_check - '90 days'::interval)) AND (dt_dead <= now()))
19. 0.000 0.000 ↓ 0.0

Index Scan using annonce_dead_partition_2014_date_part_id_modele_id_boite_id_idx on annonce_dead_partition_2014 a_3 (cost=0.69..2.94 rows=1 width=8) (actual rows= loops=)

  • Index Cond: ((date_part('year'::text, (dt_mec)::timestamp without time zone) = date_part('year'::text, (anns.dt_mec)::timestamp without time zone)) AND (id_modele = anns.id_modele) AND (id_boite = anns.id_boite) AND (id_energie = anns.id_energie) AND (prix[array_length(prix, 1)] >= CASE WHEN ((anns.prix)[array_length(anns.prix, 1)] < 0) THEN 0 WHEN (((anns.prix)[array_length(anns.prix, 1)] >= 0) AND ((anns.prix)[array_length(anns.prix, 1)] < 10000)) THEN (floor((0.99 * ((anns.prix)[array_length(anns.prix, 1)])::numeric)))::integer ELSE ((anns.prix)[array_length(anns.prix, 1)] - 100) END) AND (prix[array_length(prix, 1)] <= CASE WHEN ((anns.prix)[array_length(anns.prix, 1)] < 0) THEN 0 WHEN (((anns.prix)[array_length(anns.prix, 1)] >= 0) AND ((anns.prix)[array_length(anns.prix, 1)] < 10000)) THEN (ceiling((1.01 * ((anns.prix)[array_length(anns.prix, 1)])::numeric)))::integer ELSE ((anns.prix)[array_length(anns.prix, 1)] + 100) END) AND (km >= CASE WHEN ((anns.id_site_source <> 18) AND (anns.km < 0)) THEN 0 WHEN ((anns.id_site_source <> 18) AND (anns.km >= 0) AND (anns.km < 10000)) THEN (floor((0.99 * (anns.km)::numeric)))::integer WHEN ((anns.id_site_source <> 18) AND (anns.km >= 10,000)) THEN (anns.km - 100) ELSE NULL::integer END) AND (km <= CASE WHEN ((anns.id_site_source <> 18) AND (anns.km < 0)) THEN 0 WHEN ((anns.id_site_source <> 18) AND (anns.km >= 0) AND (anns.km < 10000)) THEN (ceiling((1.01 * (anns.km)::numeric)))::integer WHEN ((anns.id_site_source <> 18) AND (anns.km >= 10,000)) THEN (anns.km + 100) ELSE NULL::integer END))
  • Filter: ((id_ann < anns.id_ann) AND (id_site_source <> anns.id_site_source) AND (dt_dead >= (anns.dt_annonce)[1]) AND (dt_dead >= (anns.dt_check - '90 days'::interval)) AND (dt_dead <= now()))
20. 0.000 0.000 ↓ 0.0

Index Scan using annonce_dead_partition_2015_date_part_id_modele_id_boite_id_idx on annonce_dead_partition_2015 a_4 (cost=0.69..2.94 rows=1 width=8) (actual rows= loops=)

  • Index Cond: ((date_part('year'::text, (dt_mec)::timestamp without time zone) = date_part('year'::text, (anns.dt_mec)::timestamp without time zone)) AND (id_modele = anns.id_modele) AND (id_boite = anns.id_boite) AND (id_energie = anns.id_energie) AND (prix[array_length(prix, 1)] >= CASE WHEN ((anns.prix)[array_length(anns.prix, 1)] < 0) THEN 0 WHEN (((anns.prix)[array_length(anns.prix, 1)] >= 0) AND ((anns.prix)[array_length(anns.prix, 1)] < 10000)) THEN (floor((0.99 * ((anns.prix)[array_length(anns.prix, 1)])::numeric)))::integer ELSE ((anns.prix)[array_length(anns.prix, 1)] - 100) END) AND (prix[array_length(prix, 1)] <= CASE WHEN ((anns.prix)[array_length(anns.prix, 1)] < 0) THEN 0 WHEN (((anns.prix)[array_length(anns.prix, 1)] >= 0) AND ((anns.prix)[array_length(anns.prix, 1)] < 10000)) THEN (ceiling((1.01 * ((anns.prix)[array_length(anns.prix, 1)])::numeric)))::integer ELSE ((anns.prix)[array_length(anns.prix, 1)] + 100) END) AND (km >= CASE WHEN ((anns.id_site_source <> 18) AND (anns.km < 0)) THEN 0 WHEN ((anns.id_site_source <> 18) AND (anns.km >= 0) AND (anns.km < 10000)) THEN (floor((0.99 * (anns.km)::numeric)))::integer WHEN ((anns.id_site_source <> 18) AND (anns.km >= 10,000)) THEN (anns.km - 100) ELSE NULL::integer END) AND (km <= CASE WHEN ((anns.id_site_source <> 18) AND (anns.km < 0)) THEN 0 WHEN ((anns.id_site_source <> 18) AND (anns.km >= 0) AND (anns.km < 10000)) THEN (ceiling((1.01 * (anns.km)::numeric)))::integer WHEN ((anns.id_site_source <> 18) AND (anns.km >= 10,000)) THEN (anns.km + 100) ELSE NULL::integer END))
  • Filter: ((id_ann < anns.id_ann) AND (id_site_source <> anns.id_site_source) AND (dt_dead >= (anns.dt_annonce)[1]) AND (dt_dead >= (anns.dt_check - '90 days'::interval)) AND (dt_dead <= now()))
21. 0.000 0.000 ↓ 0.0

Index Scan using annonce_dead_partition_2016_date_part_id_modele_id_boite_id_idx on annonce_dead_partition_2016 a_5 (cost=0.69..2.95 rows=1 width=8) (actual rows= loops=)

  • Index Cond: ((date_part('year'::text, (dt_mec)::timestamp without time zone) = date_part('year'::text, (anns.dt_mec)::timestamp without time zone)) AND (id_modele = anns.id_modele) AND (id_boite = anns.id_boite) AND (id_energie = anns.id_energie) AND (prix[array_length(prix, 1)] >= CASE WHEN ((anns.prix)[array_length(anns.prix, 1)] < 0) THEN 0 WHEN (((anns.prix)[array_length(anns.prix, 1)] >= 0) AND ((anns.prix)[array_length(anns.prix, 1)] < 10000)) THEN (floor((0.99 * ((anns.prix)[array_length(anns.prix, 1)])::numeric)))::integer ELSE ((anns.prix)[array_length(anns.prix, 1)] - 100) END) AND (prix[array_length(prix, 1)] <= CASE WHEN ((anns.prix)[array_length(anns.prix, 1)] < 0) THEN 0 WHEN (((anns.prix)[array_length(anns.prix, 1)] >= 0) AND ((anns.prix)[array_length(anns.prix, 1)] < 10000)) THEN (ceiling((1.01 * ((anns.prix)[array_length(anns.prix, 1)])::numeric)))::integer ELSE ((anns.prix)[array_length(anns.prix, 1)] + 100) END) AND (km >= CASE WHEN ((anns.id_site_source <> 18) AND (anns.km < 0)) THEN 0 WHEN ((anns.id_site_source <> 18) AND (anns.km >= 0) AND (anns.km < 10000)) THEN (floor((0.99 * (anns.km)::numeric)))::integer WHEN ((anns.id_site_source <> 18) AND (anns.km >= 10,000)) THEN (anns.km - 100) ELSE NULL::integer END) AND (km <= CASE WHEN ((anns.id_site_source <> 18) AND (anns.km < 0)) THEN 0 WHEN ((anns.id_site_source <> 18) AND (anns.km >= 0) AND (anns.km < 10000)) THEN (ceiling((1.01 * (anns.km)::numeric)))::integer WHEN ((anns.id_site_source <> 18) AND (anns.km >= 10,000)) THEN (anns.km + 100) ELSE NULL::integer END))
  • Filter: ((id_ann < anns.id_ann) AND (id_site_source <> anns.id_site_source) AND (dt_dead >= (anns.dt_annonce)[1]) AND (dt_dead >= (anns.dt_check - '90 days'::interval)) AND (dt_dead <= now()))
22. 0.000 0.000 ↓ 0.0

Index Scan using annonce_dead_partition_2017_date_part_id_modele_id_boite_id_idx on annonce_dead_partition_2017 a_6 (cost=0.69..2.95 rows=1 width=8) (actual rows= loops=)

  • Index Cond: ((date_part('year'::text, (dt_mec)::timestamp without time zone) = date_part('year'::text, (anns.dt_mec)::timestamp without time zone)) AND (id_modele = anns.id_modele) AND (id_boite = anns.id_boite) AND (id_energie = anns.id_energie) AND (prix[array_length(prix, 1)] >= CASE WHEN ((anns.prix)[array_length(anns.prix, 1)] < 0) THEN 0 WHEN (((anns.prix)[array_length(anns.prix, 1)] >= 0) AND ((anns.prix)[array_length(anns.prix, 1)] < 10000)) THEN (floor((0.99 * ((anns.prix)[array_length(anns.prix, 1)])::numeric)))::integer ELSE ((anns.prix)[array_length(anns.prix, 1)] - 100) END) AND (prix[array_length(prix, 1)] <= CASE WHEN ((anns.prix)[array_length(anns.prix, 1)] < 0) THEN 0 WHEN (((anns.prix)[array_length(anns.prix, 1)] >= 0) AND ((anns.prix)[array_length(anns.prix, 1)] < 10000)) THEN (ceiling((1.01 * ((anns.prix)[array_length(anns.prix, 1)])::numeric)))::integer ELSE ((anns.prix)[array_length(anns.prix, 1)] + 100) END) AND (km >= CASE WHEN ((anns.id_site_source <> 18) AND (anns.km < 0)) THEN 0 WHEN ((anns.id_site_source <> 18) AND (anns.km >= 0) AND (anns.km < 10000)) THEN (floor((0.99 * (anns.km)::numeric)))::integer WHEN ((anns.id_site_source <> 18) AND (anns.km >= 10,000)) THEN (anns.km - 100) ELSE NULL::integer END) AND (km <= CASE WHEN ((anns.id_site_source <> 18) AND (anns.km < 0)) THEN 0 WHEN ((anns.id_site_source <> 18) AND (anns.km >= 0) AND (anns.km < 10000)) THEN (ceiling((1.01 * (anns.km)::numeric)))::integer WHEN ((anns.id_site_source <> 18) AND (anns.km >= 10,000)) THEN (anns.km + 100) ELSE NULL::integer END))
  • Filter: ((id_ann < anns.id_ann) AND (id_site_source <> anns.id_site_source) AND (dt_dead >= (anns.dt_annonce)[1]) AND (dt_dead >= (anns.dt_check - '90 days'::interval)) AND (dt_dead <= now()))
23. 0.000 0.000 ↓ 0.0

Index Scan using annonce_dead_partition_2018_date_part_id_modele_id_boite_id_idx on annonce_dead_partition_2018 a_7 (cost=0.70..2.95 rows=1 width=8) (actual rows= loops=)

  • Index Cond: ((date_part('year'::text, (dt_mec)::timestamp without time zone) = date_part('year'::text, (anns.dt_mec)::timestamp without time zone)) AND (id_modele = anns.id_modele) AND (id_boite = anns.id_boite) AND (id_energie = anns.id_energie) AND (prix[array_length(prix, 1)] >= CASE WHEN ((anns.prix)[array_length(anns.prix, 1)] < 0) THEN 0 WHEN (((anns.prix)[array_length(anns.prix, 1)] >= 0) AND ((anns.prix)[array_length(anns.prix, 1)] < 10000)) THEN (floor((0.99 * ((anns.prix)[array_length(anns.prix, 1)])::numeric)))::integer ELSE ((anns.prix)[array_length(anns.prix, 1)] - 100) END) AND (prix[array_length(prix, 1)] <= CASE WHEN ((anns.prix)[array_length(anns.prix, 1)] < 0) THEN 0 WHEN (((anns.prix)[array_length(anns.prix, 1)] >= 0) AND ((anns.prix)[array_length(anns.prix, 1)] < 10000)) THEN (ceiling((1.01 * ((anns.prix)[array_length(anns.prix, 1)])::numeric)))::integer ELSE ((anns.prix)[array_length(anns.prix, 1)] + 100) END) AND (km >= CASE WHEN ((anns.id_site_source <> 18) AND (anns.km < 0)) THEN 0 WHEN ((anns.id_site_source <> 18) AND (anns.km >= 0) AND (anns.km < 10000)) THEN (floor((0.99 * (anns.km)::numeric)))::integer WHEN ((anns.id_site_source <> 18) AND (anns.km >= 10,000)) THEN (anns.km - 100) ELSE NULL::integer END) AND (km <= CASE WHEN ((anns.id_site_source <> 18) AND (anns.km < 0)) THEN 0 WHEN ((anns.id_site_source <> 18) AND (anns.km >= 0) AND (anns.km < 10000)) THEN (ceiling((1.01 * (anns.km)::numeric)))::integer WHEN ((anns.id_site_source <> 18) AND (anns.km >= 10,000)) THEN (anns.km + 100) ELSE NULL::integer END))
  • Filter: ((id_ann < anns.id_ann) AND (id_site_source <> anns.id_site_source) AND (dt_dead >= (anns.dt_annonce)[1]) AND (dt_dead >= (anns.dt_check - '90 days'::interval)) AND (dt_dead <= now()))
24. 0.000 0.000 ↓ 0.0

Index Scan using annonce_dead_partition_2019_date_part_id_modele_id_boite_id_idx on annonce_dead_partition_2019 a_8 (cost=0.70..2.95 rows=1 width=8) (actual rows= loops=)

  • Index Cond: ((date_part('year'::text, (dt_mec)::timestamp without time zone) = date_part('year'::text, (anns.dt_mec)::timestamp without time zone)) AND (id_modele = anns.id_modele) AND (id_boite = anns.id_boite) AND (id_energie = anns.id_energie) AND (prix[array_length(prix, 1)] >= CASE WHEN ((anns.prix)[array_length(anns.prix, 1)] < 0) THEN 0 WHEN (((anns.prix)[array_length(anns.prix, 1)] >= 0) AND ((anns.prix)[array_length(anns.prix, 1)] < 10000)) THEN (floor((0.99 * ((anns.prix)[array_length(anns.prix, 1)])::numeric)))::integer ELSE ((anns.prix)[array_length(anns.prix, 1)] - 100) END) AND (prix[array_length(prix, 1)] <= CASE WHEN ((anns.prix)[array_length(anns.prix, 1)] < 0) THEN 0 WHEN (((anns.prix)[array_length(anns.prix, 1)] >= 0) AND ((anns.prix)[array_length(anns.prix, 1)] < 10000)) THEN (ceiling((1.01 * ((anns.prix)[array_length(anns.prix, 1)])::numeric)))::integer ELSE ((anns.prix)[array_length(anns.prix, 1)] + 100) END) AND (km >= CASE WHEN ((anns.id_site_source <> 18) AND (anns.km < 0)) THEN 0 WHEN ((anns.id_site_source <> 18) AND (anns.km >= 0) AND (anns.km < 10000)) THEN (floor((0.99 * (anns.km)::numeric)))::integer WHEN ((anns.id_site_source <> 18) AND (anns.km >= 10,000)) THEN (anns.km - 100) ELSE NULL::integer END) AND (km <= CASE WHEN ((anns.id_site_source <> 18) AND (anns.km < 0)) THEN 0 WHEN ((anns.id_site_source <> 18) AND (anns.km >= 0) AND (anns.km < 10000)) THEN (ceiling((1.01 * (anns.km)::numeric)))::integer WHEN ((anns.id_site_source <> 18) AND (anns.km >= 10,000)) THEN (anns.km + 100) ELSE NULL::integer END))
  • Filter: ((id_ann < anns.id_ann) AND (id_site_source <> anns.id_site_source) AND (dt_dead >= (anns.dt_annonce)[1]) AND (dt_dead >= (anns.dt_check - '90 days'::interval)) AND (dt_dead <= now()))
25. 0.000 0.000 ↓ 0.0

Index Scan using annonce_dead_partition_2020_date_part_id_modele_id_boite_id_idx on annonce_dead_partition_2020 a_9 (cost=0.69..2.94 rows=1 width=8) (actual rows= loops=)

  • Index Cond: ((date_part('year'::text, (dt_mec)::timestamp without time zone) = date_part('year'::text, (anns.dt_mec)::timestamp without time zone)) AND (id_modele = anns.id_modele) AND (id_boite = anns.id_boite) AND (id_energie = anns.id_energie) AND (prix[array_length(prix, 1)] >= CASE WHEN ((anns.prix)[array_length(anns.prix, 1)] < 0) THEN 0 WHEN (((anns.prix)[array_length(anns.prix, 1)] >= 0) AND ((anns.prix)[array_length(anns.prix, 1)] < 10000)) THEN (floor((0.99 * ((anns.prix)[array_length(anns.prix, 1)])::numeric)))::integer ELSE ((anns.prix)[array_length(anns.prix, 1)] - 100) END) AND (prix[array_length(prix, 1)] <= CASE WHEN ((anns.prix)[array_length(anns.prix, 1)] < 0) THEN 0 WHEN (((anns.prix)[array_length(anns.prix, 1)] >= 0) AND ((anns.prix)[array_length(anns.prix, 1)] < 10000)) THEN (ceiling((1.01 * ((anns.prix)[array_length(anns.prix, 1)])::numeric)))::integer ELSE ((anns.prix)[array_length(anns.prix, 1)] + 100) END) AND (km >= CASE WHEN ((anns.id_site_source <> 18) AND (anns.km < 0)) THEN 0 WHEN ((anns.id_site_source <> 18) AND (anns.km >= 0) AND (anns.km < 10000)) THEN (floor((0.99 * (anns.km)::numeric)))::integer WHEN ((anns.id_site_source <> 18) AND (anns.km >= 10,000)) THEN (anns.km - 100) ELSE NULL::integer END) AND (km <= CASE WHEN ((anns.id_site_source <> 18) AND (anns.km < 0)) THEN 0 WHEN ((anns.id_site_source <> 18) AND (anns.km >= 0) AND (anns.km < 10000)) THEN (ceiling((1.01 * (anns.km)::numeric)))::integer WHEN ((anns.id_site_source <> 18) AND (anns.km >= 10,000)) THEN (anns.km + 100) ELSE NULL::integer END))" Filter: ((id_ann < anns.id_ann) AND (id_site_source <> anns.id_site_source) AND (dt_dead >= (anns.dt_annonce)[1]) AND (dt_dead >= (anns.dt_check - '90 days'::interval)) AND (dt_dead <= now()))