aurweb/aurweb/scripts
moson-mo 5669821b29
perf: tweak some queries in mkpkglists
We can omit the "distinct" from some queries
because constraints in the DB ensure uniqueness:

* Groups sub-query
PackageGroup: Primary key makes "PackageID" + "GroupID" unique
Groups: Unique index on "Name" column
-> Technically we can't have a package with the same group-name twice

* Licenses sub-query:
PackageLicense -> Primary key makes "PackageID" + "LicenseID" unique
Licenses -> Unique index on "Name" column
-> Technically we can't have a package with the same license-name twice

* Keywords sub-query:
PackageKeywords -> Primary key makes "PackageBaseID" + "KeywordID" unique
(And a Package can only have one PackageBase)
Keywords -> Unique index on "Name" column
-> Technically we can't have a package with the same Keyword twice

* Packages main-query:
We join PackageBases and Users on their primary key columns
(which are guaranteed to be unique)
-> There is no way we could end up with more than one record for a Package

Signed-off-by: moson-mo <mo-son@mailbox.org>
2022-11-01 18:18:06 +01:00
..
__init__.py Make maintenance scripts installable 2016-10-17 15:23:13 +02:00
adduser.py style: Run pre-commit 2022-08-22 22:40:45 +02:00
aurblup.py style: Run pre-commit 2022-08-22 22:40:45 +02:00
config.py style: Run pre-commit 2022-08-22 22:40:45 +02:00
git_archive.py feat: archive git repository (experimental) 2022-09-24 16:51:25 +00:00
mkpkglists.py perf: tweak some queries in mkpkglists 2022-11-01 18:18:06 +01:00
notify.py chore: rename logging.py and redis.py to avoid circular imports 2022-10-22 18:51:38 +01:00
pkgmaint.py style: Run pre-commit 2022-08-22 22:40:45 +02:00
popupdate.py feat: archive git repository (experimental) 2022-09-24 16:51:25 +00:00
rendercomment.py refactor: remove redundand parenthesis when return tuple 2022-10-28 13:43:32 +01:00
tuvotereminder.py style: Run pre-commit 2022-08-22 22:40:45 +02:00
usermaint.py style: Run pre-commit 2022-08-22 22:40:45 +02:00