Hello,
I have a table in the database with the historical prices of products. This table is very bulky with more than 1 billion records.
How can I create an index in this table, to answer the query below:
select
cd_produto_price,
min(vlr_produto) as vlr_produto
from
preco_produto_fornecedor
where
dt_atualizacao < date(now())
and vlr_produto > 0
group by
cd_produto_price;
Possible indexes:
Note: I need to create the right index, because the base is already very large (disk space)