I have a series of small 'attribute' tables (innodb) with this structure:
uuid
name (TEXT)
organisation_id (INT)
In my application, when users add a new attribute, I am first performing a lookup if it already exists, SELECT * WHERE name = '?' AND organisation_id = '?'
What would the optimal index setup be?
Bonus:
I am also displaying all attributes from an organisation so often just querying the table by organisation_id, do I need a separate independent key on the organisation_id column or will the compound be ok for this too?