New answers tagged index-tuning
Finally I've been able to figure out the problem, yet I still don't know why it happenned! I've found this answer. Doing ALTER TABLE acs_spectotechnologies_com_enerconcept_0005.measuresHistory ENABLE KEYS; fixed the usage of keys for this table, now every requests are lightning fast!
What you are asking is a little daunting. Here is why: Would it be faster to store a hash of the value as well and instead index and search on that? Creating a hash column and indexing sounds like a great idea. I have suggested that back on March 03, 2013 : Possible INDEX on a VARCHAR field in MySql (See Suggestion #3) Does that even make sense if ...
Use a unique constraint (unique index), this is exactly what they're for. The difference will be in your code. If you use the unique constraint method, you need to catch the error that the dbms will throw on duplicate entries, but if you check for the value explicitly first, you won't need to catch an error. However, if you don't use the unique constraint ...
Top 50 recent answers are included