user180297
user180297

Reputation:

mysql view index

Do you know index can be added to MySQL view?

Thanks

Upvotes: 7

Views: 14067

Answers (3)

user767124
user767124

Reputation:

However, you can use some tricks. Add custom_id field to view and put value of "hash" of another unique field in same row :D

In my case i combine category id and article id

Upvotes: 0

Peter Bailey
Peter Bailey

Reputation: 105918

Nope.

For more information about indexes and MySQL view performance, read this question.

Upvotes: 0

Nanne
Nanne

Reputation: 64409

Sadly, you can't. You can index the tables the view is based on.

Also, see this question: Is it possible to have an indexed view in MySQL?

Upvotes: 6

Related Questions