user634850
user634850

Reputation: 515

MYSQL WHERE Clause Optimization

I have a question I have a primary key and key columns, is this optimized?

I have a query like this
select col(s) where primary_key=val and key_part=val

and i want know if my query is optimized

if not how to optimize it.

I edited this.

Upvotes: 0

Views: 363

Answers (1)

Sam
Sam

Reputation: 7858

There isn't much to optimize in the query itself. Using indexes over columns referenced in a where clause can improve performance though. Without knowing the details about your actual table and data, no further suggestions can be made.

Upvotes: 2

Related Questions