[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#761869: debsources: "update statistics" stage is too slow

Package: qa.debian.org
Severity: normal
User: qa.debian.org@packages.debian.org
Usertags: debsources

The "update statistics" stage of Debsources updated is currently too slow,
taking ~12 minutes on the current sources.d.n machine.

It could be easily optimized by avoiding redoing queries for each live suites
(currently: 9), where each query will do a sequential scan (due to count(*),
despite "index mostly scan") over the same data.  Instead, we can use GROUP BY
queries, taking at once stats for all suites.

(See proof of concept and benchmarks available in

-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.14-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Reply to: