Mysql improve SELECT speed

后端 未结 8 842
借酒劲吻你
借酒劲吻你 2021-01-02 05:24

I\'m currently trying to improve the speed of SELECTS for a MySQL table and would appreciate any suggestions on ways to improve it.

We have over 300 million records

8条回答
  •  生来不讨喜
    2021-01-02 05:46

    I would guess that adding an index on (tag, date) would help:

    alter table table add index (tag, date);
    

    Please post the result of an explain on this query (EXPLAIN SELECT date, value FROM ......)

提交回复
热议问题