Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

st-pk-checker: Creates a report about primary keys #13

Open
gordan-bobic opened this issue Dec 20, 2024 · 0 comments
Open

st-pk-checker: Creates a report about primary keys #13

gordan-bobic opened this issue Dec 20, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@gordan-bobic
Copy link
Contributor

gordan-bobic commented Dec 20, 2024

Parameters:

  • DSN in both formats like other tools
  • Multiple tables can specified with a comma separated list --tables t1,t2,t3
  • --tables-without-pk: only output the list of tables without PKs
  • --tables-near-pk-limit: only output the list of tables where PK is within threshold of the maximum integer size
  • --tables-with-composite-pk: only output the list of tables with composite PKs that also have additional indexes

This tool should do the following:

  1. Find tables without PKs.
    Output:
Tables without primary keys:
----------------------------
schema1.table1
schema2.table2
  1. Tables where PK is close to maximum capacity. Re-use options and default thresholds from st-int-capacity-checker.
    Output:
Tables with integer PK close to size limit:
-------------------------------------------
schema1.table1.column1: 90%
schema2.table2.column2: 91%
  1. InnoDB tables with composite primary keys that also have any secondary indexes
InnoDB tables with composite primary keys *that also have secondary indexes*
----------------------------------------------------------------------------
schema1.table1
schema2.table2
@gordan-bobic gordan-bobic added the enhancement New feature or request label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants