Is it better way to index a table ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.