In case these may be useful to others, here are two queries to find out which attributes and tags you are currently using, and to what extent.
These queries use the SQLite export, and the one for attributes depends on the changes here.
select
from_type as “Object Type",
the_type1 as “Attribute Name",
count(*) as “Number of Occurrences”,
count(distinct value) as “Number of Distinct Values”
from attribute
join link on to_type = ‘attribute’ and to_handle = handle
group by 1, 2;
select
from_type as “Object Type",
name as “Tag”,
count(*) as “Number of Occurrences”
from tag
join link on to_type = ‘tag’ and to_handle = handle
group by 1, 2;
Additional queries could give more detail (such as which objects have those attributes or tags), but that’s better done within Gramps using custom filters.