sql - Mysql: How to optimize this query. for faster results -


how optimize query, faster result tooks 80+ seconds on 10 million rows.

su_id , admin_id both btree indexed

select su_id members_ext admin_id = 5962789 

both int data types, btree index

cardinality of su_id 8496470 , admin_id 10437

explain result

id  ,select_type,table  ,type,rows,    1, simple ,members_ext , ,8496471 ,using 

make combined key on admin_id, su_id, data can fetched index only.


Comments

Popular posts from this blog

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -