"In Python, most of the bottleneck comes from having to fetch and deserialize Redis data."
This isn't a fair comparison. Of freaking course postgres would be faster if it's not reaching out to another service.ML algorithms get a lot focus and hype. Data retrieval, not as much.