I want to add only unique records into a database table. Is there any way to do this without having to do a select to see if the current record already exists, because that will get very time consuming as the table grows. I am open to all types of suggestions (if they exist).
Also as a possible alternative, perhaps there are some indexing options that make these selects faster, or perhaps the data can be ordered in such a way as to make the select statement execute faster.
I am using MySQL and Java.