mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-17 11:25:55 +08:00
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:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user