-1

Table Schema Columns: A, B, C, D, E I have a primary key in the table which combines (A, B) and I have a query -> Select all from the table whose A = 123.

So the above query will scan the whole table or not? If it will scan the table then the only solution is to create an index over a column A

Noohone
  • 694
  • 5
  • 12
Ankur Verma
  • 75
  • 1
  • 12

1 Answers1

1

It WILL try to seek and not scan (a seek is more efficient).

Note that the search terms must be "seekable". Equality is seekable (so you are OK) but, for example, LIKE "%foo%" is not seekable.