Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add index by timestamps by default #819

Closed
tonymorony opened this issue Feb 15, 2021 · 1 comment
Closed

Add index by timestamps by default #819

tonymorony opened this issue Feb 15, 2021 · 1 comment
Assignees

Comments

@tonymorony
Copy link

After such index adding:

sql_coursor.execute("CREATE INDEX timestamp_index ON stats_swaps (started_at);")

performance such select

    t = (timestamp,pair[0],pair[1],)
    sql_coursor.execute("SELECT * FROM stats_swaps WHERE started_at > ? AND maker_coin=? AND taker_coin=? AND is_success=1;", t)

works 5 times faster, so it might be good to index by timestamp by default

@artemii235
Copy link
Member

@tonymorony Done, please try to remove the index you added manually and then update MM2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants