@@ -65,12 +65,14 @@ def setupDB():
cursor.execute("""
create view players_performance_tournaments (pin,p_country_code,rating_before,rating_after,t_country_code,datum) as
select pin,pp.country_code,rating_before,rating_after,ts.country_code,datum
from players_performance as pp join tournaments as ts on pp.tournament_code=ts.code
""")
cursor.execute("""create index pp_pin on players_performance (pin)""")
cursor.execute("""create index pp_tournament_code on players_performance (tournament_code)""")
cursor.execute("""create index pp_country_ind on players_performance (country_code)""")
cursor.execute("""create index t_datum_ind on tournaments (datum)""")
connection.commit()
Status change: