MAINT: Add indexes to company_symbol/fuzzy_symbol.

Reduces AssetFinder.lookup_symbol call times
dramatically:

With fuzzy=True: 2.32ms per call -> 391 micros
With fuzzy=False: 2.35ms  -> 451 microseconds
This commit is contained in:
John Ricklefs
2015-09-24 21:14:48 -04:00
parent e3d52df88c
commit b0de423b38
+2 -2
View File
@@ -299,9 +299,9 @@ class AssetDBWriter(with_metaclass(ABCMeta)):
primary_key=constraints,
),
sa.Column('symbol', sa.Text),
sa.Column('company_symbol', sa.Text),
sa.Column('company_symbol', sa.Text, index=True),
sa.Column('share_class_symbol', sa.Text),
sa.Column('fuzzy_symbol', sa.Text),
sa.Column('fuzzy_symbol', sa.Text, index=True),
sa.Column('asset_name', sa.Text),
sa.Column('start_date', sa.Integer, default=0),
sa.Column('end_date', sa.Integer),