Just bump your chunk size to 2048 tokens and use standard recursive character splitting. That way each chunk can hold 3-4 full table schemas
That completely breaks retrieval precision for SQL generation. If you shove 4 tables into a 2048-token chunk, the embedding gets diluted by unrelated column names and types, and the retriever will pull 3 irrelevant tables for every 1 actual join you need.
Instead of raw chunking, parse your DDL into AST nodes or table-level JSON documents. Each document should be strictly one table definition with its columns, types, FKs, and a small block of sample rows or comments. Keep them around 300-500 tokens max, but use parent-child retrieval so fetching one table pulls the related foreign key tables automatically via metadata filtering.