-
-
Notifications
You must be signed in to change notification settings - Fork 563
MySQL 8.0 and MariaDB 10.6 add invisible indices #1388
Description
Is your feature request related to a problem? Please describe.
MySQL 8.0 introducted invisible indices. These are indices which are present and will be filled during INSERT/UPDATE but are not used for query optimization (e.g. to "test drop" an index and see the performance impacts without actually dropping the index)
Currently this feature is not supported at all in HeidiSQL (checked with latest nightly build 11.3.0.6317 64-bit).
SHOW CREATE TABLE on MySQL Server 8.0.24 gives the following query for a table with hidden indices:
CREATE TABLE `table` (
`id` INTEGER NOT NULL,
`v1` INTEGER NOT NULL DEFAULT 0,
`v2` INTEGER NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `kv1` (`v1`),
KEY `kv2` (`v2`) /*!80000 INVISIBLE */
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
In "CREATE code" tab in the table editor this comment is not visible at all.
Describe the solution you'd like
- Support this feature in the "Indexes" tab to see if an index is visible/invisible.
- Provide a UI functionality to change this "invisible" flag.
- Don't hide comments in "CREATE code" tab
Describe alternatives you've considered
For now it is only possible to view/change this state directly by using the "Query" tab and write a proper MySQL query by hand.
ALTER TABLE `table` ALTER INDEX `kv1` INVISIBLE;
Additional context
#128 may be connected to parts of this issue.