how to do first initial load big tables with 1 bil...
# ask-ai
r
how to do first initial load big tables with 1 billion rows
k
Loading very large tables (e.g., 1 billion+ rows) with Airbyte is challenging and there are several important considerations and limitations to be aware of: 1. Initial Full Load is Required Airbyte requires an initial full load before incremental syncs or CDC can be used. There is currently no supported way to skip the initial load and only capture changes, except for some specific connectors (like MSSQL) that offer a "New Changes Only" mode, but this is not generally available for all sources. Even if you have already loaded the data by other means, Airbyte still needs to perform its own initial sync to set up its internal state and raw tables. This is confirmed by support responses and documentation: > "Even with CDC you must run a full refresh sync the first time... I don’t think it’s possible to bypass this step." [DB Already refreshed. Want to use Airbyte for enabling CDC and Future loads](https://discuss.airbyte.io/t/1834) 2. Performance and Reliability Issues - The initial sync of very large tables (hundreds of millions to billions of rows) can take many hours or even days, and may fail due to timeouts, memory, or storage constraints. - Airbyte does not currently support resuming a failed initial sync from where it left off; if the process is interrupted, it will start from scratch on retry. [Initial Loading a large data set](https://discuss.airbyte.io/t/1563) [Increase Initial Load Timeout for Large Tables and Retry Continuation on Failure](https://github.com/airbytehq/airbyte/issues/47448) - There is a 24-hour timeout for initial loads, which is not currently configurable. 3. Workarounds and Strategies - Partitioning via Views: You can create database views that filter the table by date or another cursor, and sync each partition separately. This allows you to load the data in smaller, more manageable chunks. For example:
Copy code
sql      CREATE VIEW my_table_jan AS SELECT * FROM my_table WHERE date >= '2023-01-01' AND date < '2023-02-01';
Then sync each view as a separate Airbyte connection. [Initial Loading a large data set](https://discuss.airbyte.io/t/1563) - Increase Resources: Allocate more memory, CPU, and disk to your Airbyte deployment and connectors. For Kubernetes, increase job parallelism if possible. [Source MSSQL - initial load is very slow (CDC run)](https://discuss.airbyte.io/t/1686) - Connector Tuning: For some connectors, you can adjust parameters like
fetchSize
to control batch sizes, but this does not allow resuming from partial loads. - Destination Limitations: Some destinations (like Postgres) may struggle with large batch operations during the typing and deduplication (T&D) phase. There are ongoing discussions about improving this by processing in smaller batches, but this is not yet implemented. [Destinations for relational databases should operate in smaller batches](https://github.com/airbytehq/airbyte/discussions/44375) 4. Other Considerations - If your source system has limited CDC log retention (e.g., only 3 days of binlogs), and the initial load takes longer than that, you may lose the ability to capture all changes during the initial sync. This is a common challenge and currently there is no built-in solution in Airbyte for this scenario. [Syncing huge tables (10B+ rows) from MySQL](https://discuss.airbyte.io/t/3783) - For some sources, you may be able to pre-load the data outside of Airbyte and then use custom dbt transformations to merge with Airbyte's incremental loads, but this is a manual process and not officially supported. [Are there alternate methods for initial data loading?](https://discuss.airbyte.io/t/1836) Summary: - Airbyte requires an initial full load for large tables, which can be slow and resource-intensive. - There is no built-in way to resume a failed initial load or to skip it entirely for most connectors. - Partitioning the data via views and increasing resources are the main workarounds. - Be aware of source log retention and destination performance limitations. If you have specific requirements or constraints, you may need to combine these strategies or consider alternative ETL tools for the initial load, then switch to Airbyte for ongoing incremental syncs.
a
@kapa.ai does the MySQL Source connector support fetchSize?
k
A message from kapa.ai
Yes. Airbyte’s JDBC-based connectors, including the MySQL source, fetch records in batches controlled by a fetchSize parameter. Airbyte added logic to compute fetchSize dynamically (not user-configurable), and you can see references to dynamic fetchSize behavior and logs showing the chosen value during syncs. However, users cannot manually set fetchSize via connector config today. ([MySQL source connector performance](https://discuss.airbyte.io/t/1092), [Ideas for sync jobs speed up](https://discuss.airbyte.io/t/1168), [Sync performance](https://discuss.airbyte.io/t/1578))