Skip to content
This repository was archived by the owner on Jul 6, 2021. It is now read-only.

H001 check #124

Merged
merged 2 commits into from
Dec 7, 2018
Merged

H001 check #124

merged 2 commits into from
Dec 7, 2018

Conversation

dmius
Copy link
Collaborator

@dmius dmius commented Dec 6, 2018

No description provided.

@dmius
Copy link
Collaborator Author

dmius commented Dec 6, 2018

Пример json кода

"results": {
    "dev": {
      "data": {
        "indexes": {
          "i_board_directory_steps": {
            "reason": "Never Used Indexes",
            "schemaname": "public",
            "tablename": "board_directory",
            "indexname": "i_board_directory_steps",
            "index_scan_pct": 0,
            "scans_per_write": 0,
            "index_size": "18 MB",
            "table_size": "31 MB",
            "drop_code": "DROP INDEX CONCURRENTLY public.i_board_directory_steps; -- 18 MB, unused (idx_scan: 0), table board_directory",
            "revert_code": "CREATE INDEX CONCURRENTLY i_board_directory_steps ON public.board_directory USING btree (step1, step2, step3); -- table board_directory"
          },
          "pnct_AnyPost_parentId_id_idx": {
            "reason": "Low Scans, High Writes",
            "schemaname": "public",
            "tablename": "pnct_AnyPost",
            "indexname": "pnct_AnyPost_parentId_id_idx",
            "index_scan_pct": 0.12,
            "scans_per_write": 0.03,
            "index_size": "40 kB",
            "table_size": "352 kB",
            "drop_code": null,
            "revert_code": null
          }
        },
        "drop_code": [
          "DROP INDEX CONCURRENTLY \"pnct_AnyPost_userId_idx\"; -- 40 kB, redundant to index: \"\"\"pnct_AnyPost_userId_id_idx\"\"\", table \"pnct_AnyPost\"",
          "DROP INDEX CONCURRENTLY \"pnct_AnyPost_boardId_idx\"; -- 40 kB, redundant to index: \"\"\"pnct_AnyPost_boardId_id_idx\"\"\", table \"pnct_AnyPost\"",
          "DROP INDEX CONCURRENTLY public.i_board_directory_steps; -- 18 MB, unused (idx_scan: 0), table board_directory",
          "DROP INDEX CONCURRENTLY public.u_bot_view_row_id; -- 56 kB, unused (idx_scan: 0), table bot_visit",
        ],
        "revert_code": [
          "CREATE INDEX CONCURRENTLY \"pnct_AnyPost_userId_idx\" ON public.\"pnct_AnyPost\" USING btree (\"userId\"); -- table \"pnct_AnyPost\"",
          "CREATE INDEX CONCURRENTLY \"pnct_AnyPost_boardId_idx\" ON public.\"pnct_AnyPost\" USING btree (\"boardId\"); -- table \"pnct_AnyPost\"",
          "CREATE INDEX CONCURRENTLY i_board_directory_steps ON public.board_directory USING btree (step1, step2, step3); -- table board_directory",
          "CREATE INDEX CONCURRENTLY u_bot_view_row_id ON public.bot_visit USING btree (row_id); -- table bot_visit",
        ]
      },

@dmius
Copy link
Collaborator Author

dmius commented Dec 6, 2018

Пример md кода

# Unused/Rarely Used Indexes #

## Current values ##

### Master DB server is `dev` ###


**Index name: `cache_created`**

    Reason: Never Used Indexes
    Scheme name: translation_proxy
    Table name: cache
    Index size: 16 kB
    Table size: 40 kB
    Drop code: DROP INDEX CONCURRENTLY translation_proxy.cache_created; -- 16 kB, unused (idx_scan: 0), table cache 
    Revert code: CREATE INDEX CONCURRENTLY cache_created ON translation_proxy.cache USING btree (created); -- table cache 

**Index name: `i_archive_log_id_ring__boards`**

    Reason: Low Scans, High Writes
    Scheme name: archive
    Table name: log
    Index size: 368 kB
    Table size: 24 MB

### Slave DB servers: ###
    
#### DB slave server: `dev1` ####
          
             
**Index name: `cache_created`**

    Reason: Never Used Indexes
    Scheme name: translation_proxy
    Table name: cache
    Index size: 16 kB
    Table size: 40 kB
    Drop code: DROP INDEX CONCURRENTLY translation_proxy.cache_created; -- 16 kB, unused (idx_scan: 0), table cache 
    Revert code: CREATE INDEX CONCURRENTLY cache_created ON translation_proxy.cache USING btree (created); -- table cache 
 
**Index name: `i_archive_log_id_ring__boards`**

    Reason: Low Scans, High Writes
    Scheme name: archive
    Table name: log
    Index size: 368 kB
    Table size: 24 MB
    
## Conclusions ##

<no value>

## Recommendations ##

<no value>

@dmius dmius changed the title WIP: H001 check H001 check Dec 6, 2018
Copy link
Contributor

@Nastradamus Nastradamus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good for me :)

@dmius dmius merged commit c9c39e0 into master Dec 7, 2018
@NikolayS NikolayS deleted the dmius-h001 branch December 7, 2018 15:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants