From 97b1ab204a49f4c0a21ebbdb6af84fccbe76f1cb Mon Sep 17 00:00:00 2001 From: Hao Xu Date: Sat, 18 Jul 2020 01:42:09 -0400 Subject: [PATCH] add indices for features --- dbutils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/dbutils.py b/dbutils.py index b9828496..b3bf134b 100644 --- a/dbutils.py +++ b/dbutils.py @@ -44,6 +44,7 @@ def truncate(a, length=63): Index(truncate(table + "_year"), tables[table].c.year).create(conn) cols = list(map(lambda a : a[0], table_features)) for feature in cols: + Index(truncate(table + "_" + feature), tables[table].c[feature]).create(conn) Index(truncate(table + "_year_" + feature), tables[table].c.year, tables[table].c[feature]).create(conn) # for feature2 in cols: # Index(truncate(table + "_year_" + feature + "_" + feature2), tables[table].c.year, tables[table].c[feature], tables[table].c[feature2]).create(conn)