First thing to do is look at you where and order/group by clauses almost all of the items listed after them should have an index on them. Many should have a common index on the columns together, if they are used together a lot to filter information.
hmm. that makes a lot of sense. can you suggest some reading that can help me understand which types to use? I'm almost entirely self-taught on SQL so the result is "functional" code that's just not well-designed or optimal