Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
at the moment the only way I know is to get all the address signatures and then use getTransaction. But that is not efficient and I don't think it is the correct way to do it.
It is the correct way to do it generally speaking. Some kinds of programs support special indexers, such as the ones provided by Helius or Shyft. You can also consider writing your own custom indexer if you find yourself querying past transactions a lot.