replica અથવા snapshot માંથી વાંચો (ક્યારેય primary નહીં), OFFSET ને બદલે keyset pagination વડે page કરો, read rate throttle કરો, અને results ને સીધા object storage પર stream કરો. goal એ 500M rows ને long locks રાખ્યા વગર, primary CPU spike કર્યા વગર, કે memory ઉડાડ્યા વગર export કરવાનું છે.
Export pipeline
Primary DB ──async replication──▶ Read replica / snapshot
│ (isolated from live traffic)
▼
Export worker
keyset page: WHERE id > :last
│ throttle (sleep / rate limit)
▼
Stream (batches)
│
▼
S3 / GCS (NDJSON / Parquet)
