GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Optimize Python repository-version membership queries by kdelee · Pull Request #1458 · pulp/pulp_python Conversation
|
| Repository | Current ms | Correlated EXISTS ms | IN subquery ms | Direct join ms (this PR) |
|---|---|---|---|---|
main |
314.8 | 402.5 | 397.2 | 76.3 |
python-validated-landing |
265.1 | 13.7 | 14.0 | 25.9 |
cpu-torch2.13-el9.8-test |
57.4 | 10.3 | 10.3 | 14.3 |
cpu-torch2.13-el9.8 |
56.7 | 10.3 | 10.7 | 10.9 |
cuda12.9-torch2.13-el9.8-test |
43.6 | 10.0 | 9.9 | 10.4 |
cuda13.0-torch2.13-el9.8-test |
43.5 | 10.1 | 9.9 | 10.5 |
cuda12.9-torch2.13-el9.8 |
43.5 | 10.1 | 10.0 | 8.6 |
cuda13.0-torch2.13-el9.8 |
43.9 | 10.1 | 10.0 | 8.2 |
cpu-torch2.11-el9.8-test |
42.8 | 10.3 | 10.8 | 12.5 |
cpu-torch2.13-el9.8-sdists-test |
38.8 | 10.2 | 10.2 | 10.2 |
The four SQL shapes tested are:
pk__in=repository_version.content, backed by unnest(content_ids).EXISTS: package filter plus per-row core_repositorycontent membership check.IN subquery: package filter plus content_ptr_id__in=RepositoryContent subquery.version_memberships repository/version predicates; this PR's shape.The direct join preserves historical membership with version_added and version_removed bounds.
The same repositories and largest package, testing the narrower SQL shape used by /pypi/<distribution>/<package>/:
| Repository | Current ms | Direct join ms (this PR) |
|---|---|---|
main |
333.3 | 75.3 |
python-validated-landing |
276.5 | 23.1 |
cpu-torch2.13-el9.8-test |
59.9 | 13.6 |
cpu-torch2.13-el9.8 |
59.6 | 10.2 |
cuda12.9-torch2.13-el9.8-test |
45.3 | 9.7 |
cuda13.0-torch2.13-el9.8-test |
45.8 | 9.2 |
cuda12.9-torch2.13-el9.8 |
45.1 | 7.3 |
cuda13.0-torch2.13-el9.8 |
45.3 | 7.5 |
cpu-torch2.11-el9.8-test |
44.2 | 9.9 |
cpu-torch2.13-el9.8-sdists-test |
39.9 | 9.5 |
The direct join preserves historical membership with version_added and version_removed bounds.
pulpcore and pulp_python.EXPLAIN (ANALYZE, BUFFERS, TIMING OFF).boto3, uv-build, and posthog.git diff --check passed.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Use indexed repository-content membership instead of expanding repository-version content IDs for PyPI endpoints. Assisted-by: pi coding agent
There was an error while loading. Please reload this page.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Reuse correlated repository membership for published JSON responses and narrow metadata projections. Assisted-by: pi coding agent
Drive Python package queries from package-name predicates before applying repository-version membership. Assisted-by: pi coding agent
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.