I have a table where I store unique text strings and then I check if that string exists in the database by doing select
String checkIfAlreadyScanned = "SELECT id FROM \"STRINGS_DB\" where STR ='" + mystring + "'";
then I check if value exists. My database has around 5mil records; can I improve my method?
Maybe there is a way of creating a new attribute (hashedSTR) for example and convert string into some unique numberical value and then getting these numbers, instead of strings? Will that work faster? (will that work at all?)
To ensure the fastest processing, make sure:
ExecuteScalar()
method of your Command objectIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With