manned/util
Yorhel 1ee5c9c2df SQL: Add packages.c_hasman cache to speed up package listings
Going from average ~100ms to ~10ms or so. The previous query had a
tendency to be much slower sometimes, let's see if this cache also takes
care of those outliers.

Migration script:

  ALTER TABLE packages ADD COLUMN c_hasman boolean NOT NULL DEFAULT FALSE;

  DROP INDEX packages_system_name_key;
  CREATE UNIQUE INDEX packages_system_name_key ON packages (system, name) INCLUDE (id, c_hasman, dead);

  UPDATE packages SET c_hasman = NOT c_hasman
   WHERE c_hasman <> EXISTS(SELECT 1 FROM package_versions pv WHERE pv.package = packages.id AND EXISTS(SELECT 1 FROM files f WHERE f.pkgver = pv.id));
2024-04-29 21:15:40 +02:00
..
alpine.sh Fix indexing of Debian architecture-independent packages + Alpine 3.19 2024-01-03 10:25:48 +01:00
arch.sh Some repo updates + Debian bookworm 2021-08-17 11:29:41 +02:00
centos.sh Get rid of package categories 2024-04-28 10:37:04 +02:00
common.sh Add Debian Buster 2019-07-19 20:58:05 +02:00
cron.sh Large-ish SQL schema revamp/optimizations 2021-12-14 15:08:54 +01:00
debian.sh Fix indexing of Debian architecture-independent packages + Alpine 3.19 2024-01-03 10:25:48 +01:00
fedora.sh Get rid of package categories 2024-04-28 10:37:04 +02:00
freebsd.sh Get rid of package categories 2024-04-28 10:37:04 +02:00
indexer Replace old Arch Linux scripts with new indexer 2016-11-06 15:26:20 +01:00
netbsd.sh Get rid of package categories 2024-04-28 10:37:04 +02:00
openbsd.sh Get rid of package categories 2024-04-28 10:37:04 +02:00
ubuntu.sh Add Ubuntu 24.04 2024-04-25 17:46:45 +02:00
update_indices.sql SQL: Add packages.c_hasman cache to speed up package listings 2024-04-29 21:15:40 +02:00