aboutsummaryrefslogtreecommitdiff
path: root/data/make_time_index.py
diff options
context:
space:
mode:
authorAlex Auvolat <alex.auvolat@ens.fr>2015-05-22 10:00:15 -0400
committerAlex Auvolat <alex.auvolat@ens.fr>2015-05-22 10:00:15 -0400
commit39e549f05e568e4153381f025b3a0f256e9a7b7a (patch)
tree4e06cc45f359ad6a8cf4243fe7b42d01a23f7512 /data/make_time_index.py
parentdf50f103c1167f54a3ec04c1380fc95e4a023428 (diff)
downloadtaxi-39e549f05e568e4153381f025b3a0f256e9a7b7a.tar.gz
taxi-39e549f05e568e4153381f025b3a0f256e9a7b7a.zip
Make indexing faster by indexing only one column and querying a range
Diffstat (limited to 'data/make_time_index.py')
-rwxr-xr-xdata/make_time_index.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/data/make_time_index.py b/data/make_time_index.py
index c51d075..c2838e0 100755
--- a/data/make_time_index.py
+++ b/data/make_time_index.py
@@ -39,7 +39,7 @@ def make_valid(outpath):
c.executemany('INSERT INTO trip_times(trip, begin, end) VALUES(?, ?, ?)', times)
timedb.commit()
print "Creating index..."
- c.execute('''CREATE INDEX trip_time_index ON trip_times (begin, end)''')
+ c.execute('''CREATE INDEX trip_begin_index ON trip_times (begin)''')
if __name__ == '__main__':