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

Delete application_piped_id index #4266

Merged
merged 3 commits into from
Mar 14, 2023

Conversation

funera1
Copy link
Member

@funera1 funera1 commented Mar 14, 2023

because application_piped_id_updated_at_desc index covers the index.

What this PR does / why we need it:
The application_piped_id_updated_at_desc index covers the index.

Also, DROP INDEX statement should be remove after few releases.

Fixes #

Does this PR introduce a user-facing change?:

NONE

Reference

Before delete application_piped_id index

mysql> EXPLAIN SELECT Data FROM Application WHERE PipedId = "c360ac00-4b59-47b7-803c-f6fa56c8bebf";
+----+-------------+-------------+------------+------+-----------------------------------------------------------+----------------------+---------+-------+------+----------+-------+
| id | select_type | table       | partitions | type | possible_keys                                             | key                  | key_len | ref   | rows | filtered | Extra |
+----+-------------+-------------+------------+------+-----------------------------------------------------------+----------------------+---------+-------+------+----------+-------+
|  1 | SIMPLE      | Application | NULL       | ref  | application_piped_id,application_piped_id_updated_at_desc | application_piped_id | 146     | const |    1 |   100.00 | NULL  |
+----+-------------+-------------+------------+------+-----------------------------------------------------------+----------------------+---------+-------+------+----------+-------+
1 row in set, 1 warning (0.00 sec)**Which issue(s) this PR fixes**:
+----+-------------+-------------+------------+------+-----------------------------------------------------------+--------------------------------------+---------+-------+------+----------+-------+
| id | select_type | table       | partitions | type | possible_keys                                             | key                                  | key_len | ref   | rows | filtered | Extra |
+----+-------------+-------------+------------+------+-----------------------------------------------------------+--------------------------------------+---------+-------+------+----------+-------+
|  1 | SIMPLE      | Application | NULL       | ref  | application_piped_id,application_piped_id_updated_at_desc | application_piped_id_updated_at_desc | 146     | const |    1 |   100.00 | NULL  |
+----+-------------+-------------+------------+------+-----------------------------------------------------------+--------------------------------------+---------+-------+------+----------+-------+
1 row in set, 1 warning (0.00 sec)

After delete application_piped_id index

+----+-------------+-------------+------------+------+--------------------------------------+--------------------------------------+---------+-------+------+----------+-------+
| id | select_type | table       | partitions | type | possible_keys                        | key                                  | key_len | ref   | rows | filtered | Extra |
+----+-------------+-------------+------------+------+--------------------------------------+--------------------------------------+---------+-------+------+----------+-------+
|  1 | SIMPLE      | Application | NULL       | ref  | application_piped_id_updated_at_desc | application_piped_id_updated_at_desc | 146     | const |    1 |   100.00 | NULL  |
+----+-------------+-------------+------------+------+--------------------------------------+--------------------------------------+---------+-------+------+----------+-------+
1 row in set, 1 warning (0.01 sec)

because application_piped_id_updated_at_desc index covers the index.
@funera1 funera1 marked this pull request as ready for review March 14, 2023 05:03
@khanhtc1202 khanhtc1202 merged commit 5fdc05f into master Mar 14, 2023
@khanhtc1202 khanhtc1202 deleted the delete-application-piped-id-index branch March 14, 2023 07:33
@github-actions github-actions bot mentioned this pull request Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants