Best way to update

I have a small table of site options.

All the rows are fetched with a findAll() and cached so subsequent page requests get the values from the cache.

What’s the best way to update these rows in the table while validating too?




optionID - optionName - optionValue

1          opt1         val1



Only the optionName\Value’sare stored in the cache so I can’t associated a PK.

If any of your fields/columns in the database is unique you should go this way, it uses almost the same system as primary key to look for it and its very fast

if not, go for the unique identifier that is smaller or better yet a “int” type, I mean, do not use a text field to do some sql like "update table set field=‘asd’ where big_text like “%my long post%”