0

I have a SQL table like this:-

a | b | c | d

4 columns. It gets around 80 million entries per day

I will pass a list of column c values. What is the best way to retrieve the rows from this table with those column c values?

david419
  • 435
  • 3
  • 8
  • 18
  • http://stackoverflow.com/questions/697367/loop-through-columns-sql/12634334#12634334 by simplified it in your scenario. – shh Apr 08 '16 at 06:12

1 Answers1

1

For efficient search, an index shall be created on the column. http://www.w3schools.com/sql/sql_create_index.asp

And for filtering based on a list of values, you could use "in" operator in select query as given below.

SELECT * FROM table WHERE c IN (value1,value2,...);

If you have any further doubts, please add in the comments.

Karthikeyan
  • 990
  • 5
  • 12