Azure / Azure/data-api-builder
Sql: Improve bootstrap performance by getting all the metadata information in one go from the db
- 主要言語
- C#
- スター
- 1.5k
- フォーク
- 370
- 平均マージ
- 3日 22時間
- マージ済み PR(30日)
- 9
説明
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.
コントリビューションガイド
調査の方向性
まず SqlMetadataProvider を見つけ、DbDataAdapter、Columns に対する GetSchema、および ForeignKey Query の各パスを追跡します。データベースが列、型、主キー、デフォルト値、外部キー参照をまとめて提供できるかどうかを確認し、そのうえで bootstrap がすべてのメタデータを保持しながらデータベースへのラウンドトリップを 1 回に削減していることを検証します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- csharp, sql
- 領域
- backend-api-design, databases, performance
- issue の種類
- リファクタリング
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100