actually,It’s about 21s to create a project:
curl --location --request POST 'http://localhost:9000/api/projects/create' \
> --header 'Authorization: Basic xxx' \
> --form 'project="test"' \
> --form 'name="test"'
- sonarqube version :24.12
- type:create by api and ui is same
- deployed by docker
- I have looked the components and project_branches index
- CREATE INDEX components_kee ON components (kee); but isn’t work
sonar=# select count(*) from components;
count
45305689
(1 row)
sonar=# CREATE INDEX components_kee ON components (kee);
and there is index of components and project_branches
sonar=# \d components
Table “public.components”
Column | Type | Collation | Nullable | Default
--------------------------±----------------------------±----------±---------±--------
uuid | character varying(50) | | not null |
kee | character varying(1000) | | |
deprecated_kee | character varying(400) | | |
name | character varying(2000) | | |
long_name | character varying(2000) | | |
description | character varying(2000) | | |
enabled | boolean | | not null | true
scope | character varying(3) | | |
qualifier | character varying(10) | | |
private | boolean | | not null |
root_uuid | character varying(50) | | not null |
language | character varying(20) | | |
copy_component_uuid | character varying(50) | | |
path | character varying(2000) | | |
uuid_path | character varying(1500) | | not null |
branch_uuid | character varying(50) | | not null |
module_uuid | character varying(50) | | |
module_uuid_path | character varying(1500) | | |
main_branch_project_uuid | character varying(50) | | |
b_changed | boolean | | |
b_name | character varying(500) | | |
b_long_name | character varying(500) | | |
b_description | character varying(2000) | | |
b_enabled | boolean | | |
b_qualifier | character varying(10) | | |
b_language | character varying(20) | | |
b_copy_component_uuid | character varying(50) | | |
b_path | character varying(2000) | | |
b_uuid_path | character varying(1500) | | |
b_module_uuid | character varying(50) | | |
b_module_uuid_path | character varying(1500) | | |
created_at | timestamp without time zone | | |
Indexes:
“components_branch_uuid” btree (branch_uuid)
“components_kee_branch_uuid” UNIQUE, btree (kee, branch_uuid)
“components_uuid” UNIQUE, btree (uuid)
“idx_main_branch_prj_uuid” btree (main_branch_project_uuid)
“projects_module_uuid” btree (module_uuid)
“projects_qualifier” btree (qualifier)
“projects_root_uuid” btree (root_uuid)
sonar=# \d project_branches
Table “public.project_branches”
Column | Type | Collation | Nullable | Default
-------------------------------±-----------------------±----------±---------±--------
uuid | character varying(50) | | not null |
project_uuid | character varying(50) | | not null |
kee | character varying(255) | | not null |
branch_type | character varying(12) | | not null |
merge_branch_uuid | character varying(50) | | |
pull_request_binary | bytea | | |
manual_baseline_analysis_uuid | character varying(40) | | |
created_at | bigint | | not null |
updated_at | bigint | | not null |
exclude_from_purge | boolean | | not null | false
need_issue_sync | boolean | | not null |
Indexes:
“pk_project_branches” PRIMARY KEY, btree (uuid)
“uniq_project_branches” UNIQUE, btree (branch_type, project_uuid, kee)