Default Value of sql_generate_invisible_primary_key in Azure MySQL Flexible Server

GeethaThatipatri-MSFT 29,477 Reputation points Microsoft Employee
2024-07-26T21:46:20.2833333+00:00

Why is the default value of the sql_generate_invisible_primary_key parameter set to ON in Azure Database for MySQL flexible server, and is this a bug?

PS - Based on common issues that we have seen from customers and other sources, we are posting these questions to help the Azure community

 

Azure Database for MySQL
Azure Database for MySQL
An Azure managed MySQL database service for app development and deployment.
848 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. GeethaThatipatri-MSFT 29,477 Reputation points Microsoft Employee
    2024-07-26T21:48:25.9433333+00:00

    Greetings!

    The default value of the sql_generate_invisible_primary_key parameter is set to ON in Azure Database for MySQL flexible server by design and is not a bug. This setting ensures that MySQL generates an invisible primary key for any new InnoDB table created without an explicit primary key. This feature is enabled to improve table management and performance in MySQL version 8.0. For more details, you can refer to the MySQL documentation about Generated Invisible Primary Keys (GIPK) and the Azure documentation on what's new for MySQL flexible server.

     User's image

    Resources:

     Hope this helps. If you have any follow-up questions, please let me know. I would be happy to help.

     Please do not forget to "up-vote" wherever the information provided helps you, as this can be beneficial to other community members.

    Regards

    Geetha

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.