Mysql view index

Did you know that an index can be added to a MySQL view?

thanks

+7
source share
3 answers

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?

+6
source

Nope.

For more information on indexes and performance of MySQL views, read this question .

0
source

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

0
source

All Articles