I have a table called orders which will be very large. Two of many columns on that table are called phone and address. There will have duplicate values for these two columns. While the orders table will be huge, the amount of results it returns back from queries will never be more than 5. That's just the nature of our software design.
On our form is an address input text field with an associated datalist. This field uses ajax to query the database for address values that match the phone number entered by the user, and populates the datalist with the values.
The table would normally return duplicate values, which we do not want. So in terms of database performance, the amount of transactions, amount of data being stored, etc etc.... is it better to:
A) Use a SELECT DISTINCT on the large table?
B) Create another table called addresses. After the initial record is added to the orders table, the phone number and address values also get written to the addresses table, but only if the value for BOTH fields does not already exist.
So the question is in terms of what is the best database practice for best performance to handle a situation like this? SELECT DISTINCT from the orders table, or SELECT with no DISTINCT clause needed on the addresses table? Is the duplication of data and writes worth it?