Schema Loading
Configure how DBCode loads and caches database schema information for optimal performance.
DBCode introspects your database schema to populate the explorer tree with tables, views, columns, indexes, and other objects. For large databases with thousands of objects, this can take time. The schema loading settings let you optimize this process.
Progressive Loading
Progressive loading (experimental) changes how DBCode fetches schema information:
- Standard mode: Fetches all schema details (columns, indexes, keys) upfront when connecting
- Progressive mode: Fetches only object names initially, then loads details on-demand as you expand items
This can significantly reduce initial connection time for large databases.
When to Use Progressive Loading
Progressive loading is beneficial when:
- Your database has hundreds or thousands of tables/views
- Initial connection takes several seconds or longer
- You typically work with a small subset of tables
- You’re connecting over a slow network
Enabling Progressive Loading
- Open the connection settings (right-click connection → Edit)
- Expand the Advanced section
- Find the Introspection subsection
- Enable Progressive Loading (experimental)
Once enabled, additional options become available:
Settings
Prefetch Details
When enabled (default), DBCode fetches full schema details in the background after the initial connection completes. This gives you fast initial load times while still populating the full schema for features like autocomplete.
- Enabled: Best of both worlds - fast connection, full schema eventually
- Disabled: Only fetch details when you explicitly expand items
Batch Size
Controls how many objects are fetched per request when loading details. Higher values mean fewer requests but larger payloads.
- Default: 15-50 depending on database type
- Lower values: Better for slow connections or rate-limited APIs
- Higher values: Better for fast connections with many objects
Cache TTL
How long (in days) cached schema details remain valid before being refreshed.
- Default: 7 days
- Lower values: More frequent refreshes, always up-to-date
- Higher values: Less network traffic, faster subsequent connections
The cache is stored locally and survives VS Code restarts. Use the Refresh command on a connection to force a cache refresh.
Supported Databases
Progressive loading is currently available for:
- MySQL / MariaDB
- Trino
- Athena
Support for additional databases is being added progressively.
Tips
- If you notice stale schema information, right-click the connection and select Refresh
- The cache is per-connection, so each connection maintains its own cached schema
- Disabling prefetch reduces background network activity but may slow down autocomplete until objects are expanded