> or make it a separate index is better
The simple answer is "never". The optimizer almost never uses more than one INDEX in a query.
> index(a,b) or index(b,a) is there any difference
Think about fields last_name and first_name. Let's say you have
INDEX(last_name, first_name)
like in a Phone Directory. How, let's say you want
WHERE last_name LIKE 'J%' and first_name = 'Rick'
That index would be useless, but this would be useful:
INDEX(first_name, last_name)
If you want
WHERE last_name = 'James' and first_name = 'Rick'
then either ordering would work equally well.
My kinfolk can be found efficiently via
INDEX(last_name, first_name) _or_ INDEX(last_name)
WHERE last_name = 'James'
If you have two _separate_ SELECTs with
WHERE last_name = 'James'
WHERE first_name = 'Rick'
Then you need two _separate_ indexes:
INDEX(last_name, ...)
INDEX(first_name, ...)
(I say "..." because, for this example, extra columns in the indexes are optional.)
Deleting lots of data (including use of PARTITION for such):
http://mysql.rjweb.org/doc.php/deletebig