Closed elbracht closed 8 years ago
You might try running a single query instead of a query for each team, and aggregating in Python using a dictionary keyed on team.
The fastest way is to write a SQL query that does all of the aggregation in database.
Thank you. I use a SQL query for the aggregation in database. This runs faster.
Hi everybody.
I use the following code to get stats (passing yards, rushing yards, ...) for each team. This takes usually around 10 seconds.
Is there any way to optimize the code?