How to Repair Primary Key Index with ADMIN RECOVER INDEX tbl idx?

This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: ADMIN RECOVER INDEX tbl idx 怎么修主键索引?

| username: TiDBer_jYQINSnf

I have performed unsaferecover.
The table has a non-clustered index.
I don’t know the name of the primary key index.
What index name should I use when executing admin recover index for the primary key?

| username: 有猫万事足 | Original post link

From this table, you can see that the name of the primary key is PRIMARY, but I’m not sure if it works in this statement. You can give it a try.

| username: TiDBer_jYQINSnf | Original post link

Tried. Doesn’t work :grimacing:

| username: 啦啦啦啦啦 | Original post link

The admin recover index can only repair secondary indexes, right?

| username: TiDBer_jYQINSnf | Original post link

How do you fix it if there’s an issue with the primary key?

| username: dba远航 | Original post link

The table is non-clustered, and the primary key is implicitly created.