> SELECT * from my_table where id_1 = x and id_2 = y;
>
> Neither id_1 or id_2 or the combination of them is unique. I expect
> this table to become large over time.
Create an index on (id_1, id_2), or (id_2,id_1).
Чтобы сделать работу с сайтом удобнее, мы используем cookie и аналитический сервис «Яндекс.Метрика». Продолжая пользоваться сайтом, вы соглашаетесь с их использованием.