Monday, February 14, 2011

How to add Indexing to a Table in MySQL

Indexing a MySQL table is needed for fast search.
The below syntax is used to add index to a mysql table. Here i am assuming the table name is `product` and the `product_id` is a primary key in that mysql table.

alter table `product` add index `product_id`

No comments:

Post a Comment