Once a table is indexed based on a column field, a lookup table would be created that references the normal SQL table through the row address column.
So, for example if there are multiple instances of transaction amount, the row address in the lookup table would be pointing to the exact multiple row instance in the transaction table.
Therefore,
Select * from transaction where transactionAmount = 5000
Welcome tag moderator AKA Unofficial DEV cheerleader. While most of my friends are found on SnapChat or Tic-Toc, you can find me here. And I OOP, but Iām not a VSCO girl.
Top comments (4)
What happens if there is more than one result?
Good question Giuliovn.
Once a table is indexed based on a column field, a lookup table would be created that references the normal SQL table through the row address column.
So, for example if there are multiple instances of transaction amount, the row address in the lookup table would be pointing to the exact multiple row instance in the transaction table.
Therefore,
Select * from transaction where transactionAmount = 5000
For a multiple resultset won't be a table scan.
Your sketches are awesome and very clear.
Thanks Katie for the feedback:)