|
|
|
Round 1:
|
|
|
|
100k: 8 minutes 47 seconds
|
|
1k: 0 minutes 8 seconds
|
|
|
|
%timeit {c['_type']: c['count'] for c in repo_version.content.values('_type').annotate(count=Count('_type'))}
|
|
121 ms ± 1.01 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)
|
|
|
|
%timeit list(Content.objects.filter(pk__in=repo_version.content))
|
|
845 ms ± 3.26 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
|
|
|
|
|
|
Round 2 (101,000 pre-existing units):
|
|
|
|
100k: 13 minutes 27 seconds
|
|
1k: 0 minutes 9 seconds
|
|
|
|
%timeit {c['_type']: c['count'] for c in repo_version.content.values('_type').annotate(count=Count('_type'))}
|
|
220 ms ± 4.19 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
|
|
|
|
%timeit list(Content.objects.filter(pk__in=repo_version.content))
|
|
1.72 s ± 20.9 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
|
|
|
|
|
|
Round 3 (202,000 pre-existing units):
|
|
|
|
100k: 16 minutes 36 seconds
|
|
1k: 0 minutes 13 seconds
|
|
|
|
%timeit {c['_type']: c['count'] for c in repo_version.content.values('_type').annotate(count=Count('_type'))}
|
|
328 ms ± 5.86 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
|
|
|
|
%timeit list(Content.objects.filter(pk__in=repo_version.content))
|
|
2.58 s ± 20.8 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
|
|
|
|
|
|
Round 4 (303,000 pre-existing units):
|
|
|
|
100k: 24 minutes 49 seconds
|
|
1k: 0 minutes 24 seconds
|
|
|
|
%timeit {c['_type']: c['count'] for c in repo_version.content.values('_type').annotate(count=Count('_type'))}
|
|
785 ms ± 59.1 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
|
|
|
|
%timeit list(Content.objects.filter(pk__in=repo_version.content))
|
|
3.44 s ± 11.3 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
|
|
|
|
|
|
Round 5 (fresh repo, background 404,000 pre-existing units):
|
|
|
|
100k: 13 minutes 13 seconds
|
|
1k: 0 minutes 14 seconds
|
|
|
|
%timeit {c['_type']: c['count'] for c in repo_version.content.values('_type').annotate(count=Count('_type'))}
|
|
224 ms ± 5.28 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
|
|
|
|
%timeit list(Content.objects.filter(pk__in=repo_version.content))
|
|
1.34 s ± 10 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
|
|
|
|
|
|
Final database size: 521 MB
|
|
|
|
List of relations
|
|
Schema | Name | Type | Owner | Size | Description
|
|
--------+---------------------------------------+----------+-------+------------+-------------
|
|
public | auth_group | table | pulp | 0 bytes |
|
|
public | auth_group_id_seq | sequence | pulp | 8192 bytes |
|
|
public | auth_group_permissions | table | pulp | 0 bytes |
|
|
public | auth_group_permissions_id_seq | sequence | pulp | 8192 bytes |
|
|
public | auth_permission | table | pulp | 40 kB |
|
|
public | auth_permission_id_seq | sequence | pulp | 8192 bytes |
|
|
public | auth_user | table | pulp | 16 kB |
|
|
public | auth_user_groups | table | pulp | 0 bytes |
|
|
public | auth_user_groups_id_seq | sequence | pulp | 8192 bytes |
|
|
public | auth_user_id_seq | sequence | pulp | 8192 bytes |
|
|
public | auth_user_user_permissions | table | pulp | 0 bytes |
|
|
public | auth_user_user_permissions_id_seq | sequence | pulp | 8192 bytes |
|
|
public | django_admin_log | table | pulp | 8192 bytes |
|
|
public | django_admin_log_id_seq | sequence | pulp | 8192 bytes |
|
|
public | django_content_type | table | pulp | 8192 bytes |
|
|
public | django_content_type_id_seq | sequence | pulp | 8192 bytes |
|
|
public | django_migrations | table | pulp | 16 kB |
|
|
public | django_migrations_id_seq | sequence | pulp | 8192 bytes |
|
|
public | django_session | table | pulp | 8192 bytes |
|
|
public | file_filecontent | table | pulp | 53 MB |
|
|
public | file_filepublisher | table | pulp | 8192 bytes |
|
|
public | file_fileremote | table | pulp | 8192 bytes |
|
|
public | pulp_app_artifact | table | pulp | 8192 bytes |
|
|
public | pulp_app_artifact__id_seq | sequence | pulp | 8192 bytes |
|
|
public | pulp_app_content | table | pulp | 33 MB |
|
|
public | pulp_app_content__id_seq | sequence | pulp | 8192 bytes |
|
|
public | pulp_app_contentartifact | table | pulp | 33 MB |
|
|
public | pulp_app_contentartifact__id_seq | sequence | pulp | 8192 bytes |
|
|
public | pulp_app_contentguard | table | pulp | 8192 bytes |
|
|
public | pulp_app_contentguard__id_seq | sequence | pulp | 8192 bytes |
|
|
public | pulp_app_createdresource | table | pulp | 8192 bytes |
|
|
public | pulp_app_createdresource__id_seq | sequence | pulp | 8192 bytes |
|
|
public | pulp_app_distribution | table | pulp | 8192 bytes |
|
|
public | pulp_app_distribution__id_seq | sequence | pulp | 8192 bytes |
|
|
public | pulp_app_exporter | table | pulp | 8192 bytes |
|
|
public | pulp_app_exporter__id_seq | sequence | pulp | 8192 bytes |
|
|
public | pulp_app_progressreport | table | pulp | 56 kB |
|
|
public | pulp_app_progressreport__id_seq | sequence | pulp | 8192 bytes |
|
|
public | pulp_app_publication | table | pulp | 0 bytes |
|
|
public | pulp_app_publication__id_seq | sequence | pulp | 8192 bytes |
|
|
public | pulp_app_publishedartifact | table | pulp | 0 bytes |
|
|
public | pulp_app_publishedartifact__id_seq | sequence | pulp | 8192 bytes |
|
|
public | pulp_app_publishedmetadata | table | pulp | 8192 bytes |
|
|
public | pulp_app_publishedmetadata__id_seq | sequence | pulp | 8192 bytes |
|
|
public | pulp_app_publisher | table | pulp | 8192 bytes |
|
|
public | pulp_app_publisher__id_seq | sequence | pulp | 8192 bytes |
|
|
public | pulp_app_remote | table | pulp | 16 kB |
|
|
public | pulp_app_remote__id_seq | sequence | pulp | 8192 bytes |
|
|
public | pulp_app_remoteartifact | table | pulp | 84 MB |
|
|
public | pulp_app_remoteartifact__id_seq | sequence | pulp | 8192 bytes |
|
|
public | pulp_app_repository | table | pulp | 16 kB |
|
|
public | pulp_app_repository__id_seq | sequence | pulp | 8192 bytes |
|
|
public | pulp_app_repositorycontent | table | pulp | 33 MB |
|
|
public | pulp_app_repositorycontent__id_seq | sequence | pulp | 8192 bytes |
|
|
public | pulp_app_repositoryversion | table | pulp | 8192 bytes |
|
|
public | pulp_app_repositoryversion__id_seq | sequence | pulp | 8192 bytes |
|
|
public | pulp_app_reservedresource | table | pulp | 16 kB |
|
|
public | pulp_app_reservedresource__id_seq | sequence | pulp | 8192 bytes |
|
|
public | pulp_app_task | table | pulp | 16 kB |
|
|
public | pulp_app_task__id_seq | sequence | pulp | 8192 bytes |
|
|
public | pulp_app_taskreservedresource | table | pulp | 8192 bytes |
|
|
public | pulp_app_taskreservedresource__id_seq | sequence | pulp | 8192 bytes |
|
|
public | pulp_app_worker | table | pulp | 40 kB |
|
|
public | pulp_app_worker__id_seq | sequence | pulp | 8192 bytes |
|
|
(64 rows)
|