Hi All,
I found the following query in my slow query log, what can I do to make them better?
Your answer to this is very much appreciate.

1.Select * from filecategories where memberType = ? order by Sequence;

2.select count(*) from tbl_process WHERE (MVPCARDID like ?) AND (MYPLANID like ?);

3. select count(*) from tbl_process WHERE (MemberIDCard like ?);

4.select count(*) from tbl_process join tbl_flat_rs F1 on F1.plan_id = tbl_process.PlanID WHERE fn_subset(fld_210 , ?) AND ClientNumber <> ? AND (PartnersId = ?);
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Julian HansenCommented:
Add indexes to your tables

1. Add an index for memberType

2. Add indexce for MVPCARDID and MYPLANID

3. Add index for MemberIDCard

4. Not sure what fn_subset - you can try indexing the joined and filtered fields but it might be something in that function that also needs optimising.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.