create index packagefile_package_index on packagefiles (package);
create index packagefile_path_index on packagefiles (path);
create index packagefile_hash_index on packagefiles (hash);
+create index pkgfile_configuration on packagefiles (configuration) where configuration = 1;
create view packagefiles_pkgid as
select printf('%s-%s-%s', package, version, release) as pkgid, *,
on PA.package = PFA.package and PA.version = PFA.version and PA.release = PFA.release
where PA.status in ('installing', 'installed')
group by path
- having (count(distinct
- printf('%s:%s:%s:%s', PFA.filetype, PFA.mode, PFA.username, PFA.groupname)
+ having (count(distinct printf('%s:%s:%s:%s', PFA.filetype, PFA.mode, PFA.username, PFA.groupname)
) > 1 or count(distinct PFA.hash) > 1)
)
select PFH.*,