Did you know that an index can be added to a MySQL view?
thanks
Sorry, you canβt. You can index the tables on which the view is based.
Also see this question: Is it possible to have an indexed view in MySQL?
Nope.
For more information on indexes and performance of MySQL views, read this question .
However, you can use some tricks. Add a custom_id field to view and put the hash value of another unique field on the same line: D
In my case, I am combining the category id and article id