开发者

Can I index my database table, and if so, how?

开发者_JAVA百科Is it better way to index a table ?


Most relational databases are capable of creating and maintaining a index. Like metioned in the previous answer, unique and primary key fields are often indexed. The statement for creating custom index would be something like that: CREATE INDEX index_name ON table_name( col_name) But keep in mind, while a index CAN speed up your selects it CAN slow down your inserts and updates.


Your database engine very likely creates an index for unique fields and primary keys automatically.

But of course you can also create indexes manually. Read about creating indexes in MySQL.

To give you better information, please clarify your question and specify which DB engine you use.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜