简体   繁体   中英

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM