Suppose file column_ids.csv contains the first column with some IDs. You have a table big_table.csv with the first column also containing IDs. We can join the two files in unix shell:
join -t "," <(sort file_1.csv) <(sort file_2.csv) > result.csv
-t option specifies a delimiter.
Both files must be sorted in the same order on the key value.