Skip to content

Commit

Permalink
Drop FINAL requirement for transfers queries (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
0237h authored May 28, 2024
1 parent fcc8b5d commit 6c3fe98
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/usage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,15 @@ export async function makeUsageQuery(ctx: Context, endpoint: UsageEndpoints, use
query += `transfers_from `;
} else if (q.to) {
query += `transfers_to `;
} else if (q.contract) {
} else if (q.contract || q.symcode) {
query += `transfers_contract `;
} else {
query += `transfer_events `;
}

query += `FINAL`;
// FINAL increases ClickHouse query response time significantly when lots of data needs merging
// Drop it for now
//query += `FINAL`;
} else if (endpoint == "/holders") {
query += `SELECT DISTINCT account, value FROM eos_tokens_v1.account_balances FINAL WHERE value > 0`;
} else if (endpoint == "/head") {
Expand Down

0 comments on commit 6c3fe98

Please sign in to comment.