Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INDEX inutilisés (voire redondants) #213

Open
cquest opened this issue Nov 17, 2020 · 0 comments
Open

INDEX inutilisés (voire redondants) #213

cquest opened this issue Nov 17, 2020 · 0 comments

Comments

@cquest
Copy link
Contributor

cquest commented Nov 17, 2020

select indexname,index_size from db_stats where number_of_scans=0 and tuples_read=0 and tuples_fetched=0;

                indexname                 | index_size 
------------------------------------------+------------
 gidx_ban_odbl                            | 1323 MB
 idx_ban_odbl_code_insee                  | 423 MB
 cumul_adresses_source                    | 589 MB
 cumul_adresses_dept                      | 560 MB
 idx_fantoir_fantoir                      | 317 MB
 idx_fantoir_code_insee                   | 62 MB
 idx_fantoir_voie_dept                    | 51 MB
 cumul_places_fantoir_idx                 | 87 MB
 planet_osm_postal_code_geom              | 46 MB
 planet_osm_postal_code_osm_id_idx        | 12 MB
 planet_osm_postal_code_pkey              | 12 MB
 cumul_voies_fantoir                      | 45 MB
 cumul_voies_insee_source                 | 13 MB
 cumul_voies_dept                         | 12 MB
 cumul_voies_source                       | 12 MB
 planet_osm_communes_statut_pkey          | 24 MB
 planet_osm_communes_statut_rel_id_idx    | 8272 kB
 idx_planet_osm_communes_statut_ref_insee | 6624 kB
 gidx_polygones_postaux                   | 2592 kB
 gidx_polygones_insee                     | 2080 kB
 spatial_ref_sys_pkey                     | 304 kB
 idx_cog_commune_com                      | 848 kB
 gidx_codes_postaux                       | 2128 kB
 idx_codes_postaux_insee                  | 1056 kB
 idx_codes_postaux_cp                     | 504 kB
 gidx_suffixe                             | 464 kB
 idx_population_insee_insee_com           | 784 kB
 idx_statut_fantoir_insee                 | 280 kB
 idx_cog_canton_can                       | 72 kB
 idx_cog_arrondissement_arr               | 16 kB
 idx_cog_departement_dep                  | 16 kB
 idx_cog_region_reg                       | 16 kB
 labels_statuts_adresse_pkey              | 16 kB
 parcelles_noms_insee_com                 | 8192 bytes
 idx_statut_adresse_insee                 | 8192 bytes
(35 rows)

Sur les tables cumul_* plusieurs index semblent redontants:

  • "cumul_adresses_fantoir" btree (fantoir)
  • "cumul_adresses_fantoir_source_idx" btree (fantoir, source)

le second inclut le premier, vu qu'il commence par la même colonne

  • "cumul_adresses_insee" btree (insee_com) WITH (fillfactor='95')
  • "cumul_adresses_insee_source" btree (insee_com, source) WITH (fillfactor='95')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant