the first step is to post the question in SQL and PL/SQL and not in the forum space for SQL Developer (Not for general SQL/PLSQL questions)
The SQL forum has a FAQ Re: 3. How to improve the performance of my query? / My query is running slow. So read this part and include more information about your problem.
PS: Did you already read Bad CaRMa?