graphql-python / graphql-python/graphene-sqlalchemy
Performance Issue: Inefficient Slicing of Connection Queries
- 主要語言
- Python
- 星號
- 985
- 分支
- 223
- PR 合併指標
- 30 天內沒有已合併 PR
描述
Performance Issue: Inefficient Slicing of Connection Queries
Currently, when performing a connection query with arguments like first: 20, after: some_token, the system retrieves the entire dataset from the database and then applies slicing in-memory. This approach becomes increasingly inefficient as the size of the database grows.
It would be highly beneficial to support slicing directly at the database level to improve performance and reduce unnecessary data processing.
Suggested Improvement:
Implement database-level pagination to handle first, after, etc., during the query execution phase, rather than after data retrieval.
貢獻指南
研究方向
該 issue 未指定檔案、測試或進入點。首先追蹤 connection 查詢如何擷取資料並套用 first/after 切片,然後檢查 SQLAlchemy 查詢建構路徑。當分頁參數在資料庫層級套用、無需擷取整個資料集,且已驗證大型結果集下的效能表現時,即視為完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- graphql, python, sqlalchemy
- 領域
- backend-api-design, database, performance
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100