[Catalog-sig] Speeding up /pypi
"Martin v. Löwis"
martin at v.loewis.de
Tue Jul 10 08:07:15 CEST 2007
I created a partial index (didn't know such a thing existed until
yesterday) to speed up the computation of the home page:
CREATE INDEX journals_latest_releases ON
journals(submitted_date, name, version)
WHERE version IS NOT NULL AND action='new release';
and reworked the query to let postgres actually use that index;
now I can get the Cheeseshop home page as fast as that of
www.python.org (namely, in 0.1s), as measured by
start=time.time();x=urllib.urlopen("http://cheeseshop.python.org/pypi").read();print
time.time()-start
Regards,
Martin
More information about the Catalog-SIG
mailing list