mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-24 21:04:03 +08:00
clickhouse improve sync speed
This commit is contained in:
parent
bf008e21b2
commit
2bd11cb7ad
@ -1433,7 +1433,9 @@ async function syncClickhouseMapping(
|
||||
}
|
||||
|
||||
const clickhouseTableName = `analytics_internal.${mapping.targetTable}`;
|
||||
await ensureClickhouseSchema(client, tableSchema, clickhouseTableName);
|
||||
// Skip ensureClickhouseSchema — we only sync to our own internal ClickHouse
|
||||
// where tables are already created. CREATE TABLE IF NOT EXISTS is always a
|
||||
// no-op but costs a slow DDL round trip per mapping per sync invocation.
|
||||
|
||||
let lastSequenceId = await getClickhouseLastSyncedSequenceId(client, tenancyId, mappingId);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user