Hi Keito,
By "takes a long time" do you mean it takes a long time for Solve
to finish, or it takes a long time to manually construct the list of conditions? If the former, you will have to provide more details about the equation you are trying to solve, if the latter, then this is one way to programmatically construct the list of conditions.
ClearAll[a, b, c, d, e, f, g, h];
vars = {a, b, c, d, e, f, g, h};
And @@ (First@# != Last@# & /@ Subsets[vars, {2}])
(*
a != b && a != c && a != d && a != e && a != f && a != g && a != h &&
b != c && b != d && b != e && b != f && b != g && b != h && c != d &&
c != e && c != f && c != g && c != h && d != e && d != f && d != g &&
d != h && e != f && e != g && e != h && f != g && f != h && g != h
*)