First you can browse through the Rails api doc. Most of the times this would answer your questions. But for some questions you get stuck as you noticed.
This is mostly a sign that it will become difficult to get the answer, since no documentation is present. So you have two options: do not use the method/feature you were looking information for, but use something else. Or get ready to spend a lot of time browsing through the Rails sources on github.
Use something like this Google query to get access to the particular github part. This will mostly send you to the correct file, but at some blob instead of the master, so find the same file in the master tree, so you know the thing you are looking for is available in your Rails (assuming that you are using the master/unmodified version)
Next part is more difficult, you found the retrieve_connection
method by now, but it uses another method retrieve_connection_pool
, which is used in another file somewhere in the active_record/connection_adapters(/abstract) directory path. Which is using some other class, found in ..., and so on ...
This situation is mostly the case if you are browsing through the sources. After a while you will likely get the hang of it and become more used finding things you need. But it will always be a lot of work to find the answer this way.
So the choice is yours I guess.
PS Instead of using the Rails API you can try to type in some of your keywords ActiveRecord::Base.connection tables indexes in Google and hope someone wrote an article on these subjects and did the Rails source research for you.