Benchmarking different methodologies in retrieving hierarchical data using Flask, SQLAlchemy and Postgres