IME this puts the problem off six months (which might be enough!) but the technical debt interest bill comes calling.
If your algorithm is fundamentally shitty, you can scale it up by brute force for a certain time, then it outstrips your ability to do so, and you may need to apply actual competence to the problem. If you have any on hand that knows your systems.
(I'm a sysadmin. I have full confidence in my job existing for many decades to come. Because even in the future, nothing works.)
The problem is that it means you need to fix the same problem again soon, and finding something faster than SSDs which you can store your 1TB of data on isn't really feasible. On the other hand, if you'd just added an index to the column you are querying on...