I am currently trying to grep a large list of ids (~5000) against an even larger csv file (3.000.000 lines).
grep
I want all the csv lines, that contain an i
Try
grep -f the_ids.txt huge.csv
Additionally, since your patterns seem to be fixed strings, supplying the -F option might speed up grep.
-F
-F, --fixed-strings Interpret PATTERN as a list of fixed strings, separated by newlines, any of which is to be matched. (-F is specified by POSIX.)