Skip to main content

Indexed Fields Reference for where and orderBy

Use indexed fields in your where filters and orderBy clauses. Filtering or sorting on non-indexed fields can lead to slow queries, timeouts.

This page lists the fields that are indexed for each cube, dataset, and chain type. Prefer these fields when building where and orderBy conditions.

Best practice

In where, filter on at least one indexed field (Index 1, 2, 3, or 4 where applicable). In orderBy, sort by an indexed field when possible.


EVM (Archive)​

CubeIndex 1Index 2Index 3Index 4
BalancesBalance_AddressCurrency_SmartContract——
BlocksBlock_HashBlock_Number——
CallsCall_FromCall_ToTransaction_Hash—
DEXTradesTransaction_Hash———
DEXTradeByTokensTrade_Currency_SmartContractTrade_Side_Seller——
EventsCall_ToTransaction_Hash——
MinerRewardsBlock_CoinbaseBlock_NumberBlock_Hash—
HoldersCurrency_SmartContract———
TransactionsTransaction_FromTransaction_HashTransaction_To—
TransfersTransaction_HashTransfer_SenderTransfer_ReceiverTransfer_Currency_SmartContract

Tron (Archive)​

CubeIndex 1Index 2Index 3Index 4
BalancesBalance_AddressCurrency_SmartContract——
BlocksBlock_HashBlock_Number——
CallsCall_FromCall_ToTransaction_Hash—
DEXTradesTransaction_Hash———
DEXTradeByTokensTrade_Currency_SmartContractTrade_Side_Seller——
EventsCall_ToTransaction_Hash——
HoldersCurrency_SmartContract———
TransactionsTransaction_Hash———
TransfersTransaction_HashTransfer_SenderTransfer_ReceiverTransfer_Currency_SmartContract

Solana​

Solana Realtime​

CubeIndex 1Index 2Index 3
DEXPoolsPool_Market_MarketAddress——
DEXTradeByTokensTrade_Currency_MintAddress——
InstructionsTransaction_SignerInstruction_Program_Address—
TransfersTransfer_Receiver_OwnerTransfer_Sender_OwnerTransaction_Signature

Solana Archive​

CubeIndex 1Index 2Index 3
DEXTradeByTokensTrade_Currency_MintAddressTrade_Account_Owner—

Trading (Realtime)​

CubeIndex 1Index 2Index 3Index 4Index 5
CurrenciesCurrency_IdInterval_Time_Start———
TokensToken_IdInterval_Time_StartCurrency_IdToken_Address—
PairsToken_IdCurrency_IdInterval_Time_StartToken_AddressPool_Address
TradesTrader_AddressPair_Token_AddressPair_Pool_Address——

How to use this reference​

  1. Identify your cube — e.g. EVM.Transactions, Solana.Transfers, Trading.Tokens.
  2. Check chain and dataset — EVM Archive, Tron Archive, Solana Realtime/Archive, or Trading Realtime.
  3. Use indexed fields in where — Prefer filters on the indexed columns (Index 1, 2, 3, 4). Example: for EVM(dataset: archive).Transactions, filter on Transaction_From, Transaction_Hash, or Transaction_To.
  4. Use indexed fields in orderBy — Sort by one of the indexed fields (e.g. Block_Number, Transaction_Hash) for predictable, fast ordering.

Using fields that are not in these tables for filtering or sorting may work in some cases but can cause poor performance or unexpected behavior. When in doubt, stick to the indexed fields listed above.

Build with Bitquery

Ready to run this in production?

Get an API key and run these queries in minutes, or talk to us about plans and enterprise delivery.