prices.layer1_usdtables! A slight caveat is that while previously we had prices for all minutes up to current time, we now have prices up to 5 minutes before current time.
prices.layer1_usd. This table is partitioned on
(symbol, minute)as primary key as before.
prices.usdso that you can avoid the additional join with
erc20.tokensfor calculating correct volumes.
prices.usdwas partitioned on the token
symbol, and it’s primary key was
(symbol, minute). In this release we’ve made a change to this scheme to allow for multiple
contract_addresses to map to the same
symbol. This could happen e.g. in times where a token migration is happening.
prices.usdis now partitioned on
contract_addressand it’s primary key is
SELECT minute, price FROM prices.usd WHERE symbol='x'in certain cases where there are two contracts mapped to the symbol
xin a time window. You may then receive several rows per minute. It is better to then use the primary key
contract_addressfor filtering and joining.