MySQL5.7 Find_In_Set alternative I have a table that contains User information from different countries. Information like - Name, Country, LastLoginDate, IsUpdated, Certification.

This table has 1.5 million rows. Now to filter this, I have a stored procedure that takes input as - 
UserNames = 'John, Matt, Robin'

And the query looks like - 

SELECT Name, Country, LastLoginDate FROM Users
WHERE find_in_set(Users.Name, UserNames) &lt;&gt; 0
;


The EXPLAIN statement says that this has type - ALL and doesn't use any index. Is there any way I can take the text and create a table with input values and join to my core table which will help using index and faster ouput?
You can split the search parameters and use a join instead. Example

-- Some data to test with
CREATE TABLE testdata ( x varchar(100) not null primary key );
INSERT INTO testdata (x) VALUES ('a'),('c'),('e');

-- This can be a temporary table, add all numbers up to
-- the maximum number of tokens in parameter string
CREATE TABLE positions (pos int not null primary key);
INSERT INTO positions (pos) VALUES (1),(2),(3),(4),(5);

-- Table that hold tokens, this can also be a temporary table
CREATE TABLE tokens (token varchar(100) not null primary key);

-- Split the search string in individual tokens, and store in table
INSERT INTO tokens
SELECT substring_index(
           substring_index(T.tokens, ',', p.pos)
         , ','
         , -1
       ) as token
FROM (SELECT 'a,b,c,d' as tokens) as T -- 'a,b,c,d' is the search string
JOIN positions p
  ON char_length(T.tokens) 
    - char_length(replace(T.tokens, ',', '')) 
    &gt;= p.pos - 1;

-- Get all testdata that matches search string
SELECT t.*
FROM testdata t
JOIN tokens tt
    ON t.x = tt.token;

x
-
a
c