data-api-builder icon indicating copy to clipboard operation
data-api-builder copied to clipboard

Sql: Improve bootstrap performance by getting all the metadata information in one go from the db

Open Aniruddh25 opened this issue 3 years ago • 0 comments

In SqlMetadataProvider, we use different methods to collect metadata information from the underlying database object source:

  1. a DbDataAdapter to get table columns, their type, and primary key
  2. GetSchema on Columns to find out if each column has Default value or not.
  3. Use a ForeignKey Query to derive the referenced table, and the referenced columns.

This involves multiple round trips to the database. This issue is to investigate if we can optimize this bootstrap to acquire all this information in a single roundtrip.

Aniruddh25 avatar May 03 '22 14:05 Aniruddh25