Aswin
12/01/2025, 10:13 AMkapa.ai
12/01/2025, 10:13 AMINSERT statements, so the data in the destination is freshly written, and any existing bloat or fragmentation from the source is not carried over. The destination tables will be as "clean" as a fresh set of inserts can make them, but Airbyte does not create indexes or other database objects beyond the tables and columns needed for the data itself. If you want indexes in the destination, you need to create them yourself after the migration, unless your destination setup or normalization process includes them. [See: Full refresh and initial snapshot](https://docs.airbyte.com/platform/understanding-airbyte/cdc) [See: Initial creation overview](https://airbyte.com/tutorials/incremental-data-synchronization#step-7) - No Bloat Migration: Since Airbyte is not copying the physical files or the internal storage structure, but rather reading data and writing it as new rows, any bloat (dead tuples, fragmentation, etc.) from the source is not transferred. The destination tables will only have the data that was present at the time of the initial sync, written as new rows. ### Change Data Capture (CDC) After Initial Load - CDC for Ongoing Sync: After the initial full load, Airbyte uses Change Data Capture (CDC) to keep the destination in sync with the source. CDC works by reading the source database’s transaction log (WAL in Postgres) and capturing all changes (INSERT, UPDATE, DELETE). These changes are then applied to the destination, so only new or changed data is transferred after the initial sync. [See: CDC overview and process](https://docs.airbyte.com/platform/understanding-airbyte/cdc) [See: CDC tutorial](https://airbyte.com/tutorials/incremental-change-data-capture-cdc-replication) - How CDC Works: Airbyte uses Debezium internally to read the WAL and transmit changes. The first sync is a snapshot (full refresh), and subsequent syncs use the WAL to replicate only the changes since the last sync. [See: CDC with Debezium and WAL](https://airbyte.com/tutorials/incremental-change-data-capture-cdc-replication) ### Indexes and Schema - Indexes: Airbyte does not automatically create indexes in the destination database that match those in the source. You will need to manually create any indexes, constraints, or other schema objects you require in the destination after the migration. ### Summary - The initial data transfer is a fresh insert of all data, so bloat and fragmentation from the source are not carried over. - CDC keeps the destination up to date by applying only the changes that occur after the initial sync. - Indexes and other advanced schema objects are not automatically migrated; you must handle these separately. If you need more details on how to handle indexes or schema migration, you may need to use additional tools or manual steps, as Airbyte focuses on the data itself, not the full schema or database structure.