

Your performance issues are likely not an issue with thunderbird but with your hardware or some weird filesystem. Like others in the replies I have ten years of emails stored in my thunderbird inbox and they search near instantly.
It does not matter where the mails come from (gmail or other), if you are using thunderbird or any other client to store them locally, virtually all providers have an imap and pop3 endpoint the client connects to download everything
Are you crazy? On the terminal?
Regedit is a lot easier!
/s