In programming, there’s almost always more than one way to do anything. Try searching the forum for “performance”. You’ll find lots of hints, some of which will likely apply in your situation.
If you want someone here to take a closer look, then they should have some details to look at: your pattern of data access, and a description of the structure of the table(s) involved. Otherwise, it’s all guesswork, from our end.