Description
SQL queries in the metadata layer use SELECT *, which loads all columns including potentially heavy ones like metadata JSON blobs. This is wasteful when only a subset of columns is needed (e.g., listing object keys).
Location
src/metadata/sqlite.rs:74
Details
Queries like:
sqlx::query_as::<_, ObjectRecord>("SELECT * FROM objects WHERE key = ?")
should be replaced with explicit column lists to:
- Avoid loading heavy columns (e.g.,
metadata JSON) when not needed
- Improve query performance for list operations
- Make the code more resilient to schema changes
Acceptance Criteria
Description
SQL queries in the metadata layer use
SELECT *, which loads all columns including potentially heavy ones likemetadataJSON blobs. This is wasteful when only a subset of columns is needed (e.g., listing object keys).Location
src/metadata/sqlite.rs:74Details
Queries like:
should be replaced with explicit column lists to:
metadataJSON) when not neededAcceptance Criteria
SELECT *queries insqlite.rs