I have a large table with millions of records.
Table `price`
------------
id
product
site
value
The table is brand new and there are no indexes.
Then I issued a request to create a new index with the following request:
CREATE INDEX ix_price_site_product_value_id ON price (site, product, value, id);
It took a lot of time, the last time I checked, it worked for 5000+ seconds because of the car.
I am wondering if I am creating another index creation, will it use the existing index in process calculation? If so, in what form?
Then run query 1:
CREATE INDEX ix_price_product_value_id ON price (product, value, id);
Then run query 2:
CREATE INDEX ix_price_value_id ON price (value, id);
source
share