Tags: thirdweb-dev/insight
Tags
Remove FINAL from ClickHouse queries (#315) * Remove FINAL from ClickHouse queries Remove the FINAL clause from multiple SELECT queries in internal/libs/clickhouse.go. Affected functions: GetTransactionMismatchRangeFromClickHouseV2, GetLogsMismatchRangeFromClickHouseV2, getBlocksFromV2, getTransactionsFromV2, getLogsFromV2, and getTracesFromV2. Queries now read directly from the respective tables (blocks, transactions, logs, traces) without the FINAL modifier. * Remove FINAL from ClickHouse SELECT queries internal/libs/clickhouse.go: remove the FINAL clause from SELECT queries in queryBlocksByBlockNumbers, queryTransactionsByBlockNumbers, queryLogsByBlockNumbers and queryTracesByBlockNumbers. The change drops "FINAL" from queries against blocks, transactions, logs and traces tables (keeps same ordering and fields). This avoids using ClickHouse's FINAL merge behavior in these lookups, simplifying the queries and addressing related performance/consistency concerns.
PreviousNext