Answer the question
In order to leave comments, you need to log in
How to put indexes in MySQL?
Hello. There is a table of type InnoDB, it has about 10 million records.
It has the following structure:
ID int(11)
MarketName varchar(255)
High double
Low double
Volume double
Last double
BaseVolume double
TimeStamp timestamp
Bid double
Ask double
OpenBuyOrders int(11)
OpenSellOrders int(11)
SELECT * FROM `crm_exchanges_bittrex_currencies` WHERE `TimeStamp` BETWEEN STR_TO_DATE('2017-10-19 00:00:00', '%Y-%m-%d %H:%i:%s') AND STR_TO_DATE('2017-10-20 23:59:59', '%Y-%m-%d %H:%i:%s') and `MarketName` = 'BITCNY-BTC'
Answer the question
In order to leave comments, you need to log in
create index crm_exchanges_bittrex_currencies_market_time_idx on crm_exchanges_bittrex_currencies (MarketName, TimeStamp);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question