Unfortunately, FINDINSET function cannot utilize indices in MySQL. This is because FINDINSET function is not a deterministic function, which means that it can return different results for the same input values. Therefore, MySQL does not allow the use of indexes on columns used in FINDINSET function. To improve performance, you may consider redesigning the table schema or using a different approach such as creating a separate table to store the sets and performing a JOIN operation.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2021-12-02 11:00:00 +0000
Seen: 10 times
Last updated: Sep 02 '22
How can multiple queries be merged into a single stored procedure in MySQL?
What does "waiting for handler commit" mean in relation to the slow writes experienced in MySQL 8?
How can Spring Boot and Mysql be utilized for CRUD operations?
How can I use sqlalchemy to merge JSON within a column of mysql?
Retrieve all rows in which two IDs appear for the first time.
What are the benefits of choosing sqlalchemy.types instead of sqlalchemy.dialects.mssql?