Support #1755
Remove unused indexes
| Status: | New | Start date: | 04/09/2012 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | DataBase | |||
| Target version: | - | |||
| Rank: | 99 | Tester: |
Description
based on a scan of fo.usa, remove indexes from the db schema that are not used. Specifically:
copyright.agent_fx_idx
attrib.attrib_key_fk_idx
schemaname | relname | indexrelname | idx_scan | index_size
------------+------------------+----------------------------+------------+------------
public | agent_lic_status | processed_idx | 0 | 41 MB
public | copyright | agent_fk_idx | 0 | 2713 MB
public | report_cache | report_cache_createdts | 0 | 32 kB
public | attrib | attrib_key_fk_idx | 1 | 152 MB
public | agent_lic_status | inrepository_idx | 4 | 41 MB
History
Updated by Bob Gobeille about 1 year ago
The query that shows index use is:
SELECT schemaname, relname, indexrelname,
idx_scan, pg_size_pretty(pg_relation_size(i.indexrelid)) AS index_size
FROM
pg_stat_user_indexes i
JOIN pg_index USING (indexrelid)
WHERE
indisunique IS false
ORDER BY idx_scan,relname;
Updated by Mary Laser 9 months ago
- Target version deleted (
2.0.1)
Updated by Bob Gobeille 8 months ago
- Rank set to 99
Change unranked issues to rank 99 so they show up in a ranking report at the bottom. Otherwise, they show up on top.