I am trying to read record in pyspark script from huge oracle table which have composite primary key (lets say id1,id2)
If i query by using filter on id1 in (1,2,3,4 and so on) and id2 in (10) getting timeout error or long run
i am able to query only using below pattern
select * from table where id1=1 and id2 in (10)
union all
select * from table where id1=2 and id2 in (10)
union all
select * from table where id1=3 and id2 in (10)
union all
select * from table where id1=4 and id2 in (10)
and so on
Any suggestion to query without union all multiple times would help