-
🐘 @NikolaySAuthor DeveloperFirst 3 have GINs:
notes
,issues
,merge_requests
Checking 4th line --
gitlab_partitions_dynamic.web_hook_logs_202110
:=# \d gitlabhq_production.gitlab_partitions_dynamic.web_hook_logs_202110 Table "gitlab_partitions_dynamic.web_hook_logs_202110" Column | Type | Collation | Nullable | Default ------------------------+-----------------------------+-----------+----------+------------------------------------------- id | bigint | | not null | nextval('web_hook_logs_id_seq'::regclass) web_hook_id | integer | | not null | trigger | character varying | | | url | character varying | | | request_headers | text | | | request_data | text | | | response_headers | text | | | response_body | text | | | response_status | character varying | | | execution_duration | double precision | | | internal_error_message | character varying | | | updated_at | timestamp without time zone | | not null | created_at | timestamp without time zone | | not null | Partition of: web_hook_logs FOR VALUES FROM ('2021-10-01 00:00:00') TO ('2021-11-01 00:00:00') Indexes: "web_hook_logs_202110_pkey" PRIMARY KEY, btree (id, created_at) "index_9cd16f1883" btree (created_at, web_hook_id) "index_fb2dcc655b" btree (web_hook_id) Foreign-key constraints: TABLE "web_hook_logs" CONSTRAINT "fk_rails_bb3355782d" FOREIGN KEY (web_hook_id) REFERENCES web_hooks(id) ON DELETE CASCADE =# \d web_hook_logs Partitioned table "public.web_hook_logs" Column | Type | Collation | Nullable | Default ------------------------+-----------------------------+-----------+----------+------------------------------------------- id | bigint | | not null | nextval('web_hook_logs_id_seq'::regclass) web_hook_id | integer | | not null | trigger | character varying | | | url | character varying | | | request_headers | text | | | request_data | text | | | response_headers | text | | | response_body | text | | | response_status | character varying | | | execution_duration | double precision | | | internal_error_message | character varying | | | updated_at | timestamp without time zone | | not null | created_at | timestamp without time zone | | not null | Partition key: RANGE (created_at) Indexes: "web_hook_logs_pkey" PRIMARY KEY, btree (id, created_at) "index_web_hook_logs_part_on_created_at_and_web_hook_id" btree (created_at, web_hook_id) "index_web_hook_logs_part_on_web_hook_id" btree (web_hook_id) Foreign-key constraints: "fk_rails_bb3355782d" FOREIGN KEY (web_hook_id) REFERENCES web_hooks(id) ON DELETE CASCADE Number of partitions: 10 (Use \d+ to list them.) # \dt+ gitlab_partitions_dynamic.web_hook_logs_202110 List of relations Schema | Name | Type | Owner | Persistence | Size | Description ---------------------------+----------------------+-------+--------+-------------+-------+------------- gitlab_partitions_dynamic | web_hook_logs_202110 | table | gitlab | permanent | 58 GB | (1 row)
-- no GINs
However, only the first 2 lines have duration > 10 min:
2817.50 s>> postgresql.csv:2021-10-07 16:25:07.635 GMT,,,45969,,615f1461.b391,10,,2021-10-07 15:38:09 GMT,214/412643412,3577981514,LOG,00000,"automatic analyze of table ""gitlabhq_production.public.notes"" system usage: CPU: user: 858.26 s, system: 148.82 s, elapsed: 2817.50 s",,,,,,,,,"" 1017.64 s>> postgresql.csv:2021-10-07 15:10:46.919 GMT,,,23445,,615f090e.5b95,24,,2021-10-07 14:49:50 GMT,15/1148521853,3572866564,LOG,00000,"automatic analyze of table ""gitlabhq_production.public.issues"" system usage: CPU: user: 166.70 s, system: 72.99 s, elapsed: 1017.64 s",,,,,,,,,""
both are on tables with GINs.
Edited by Nikolay Samokhvalov
Please register or sign in to comment