Browse Source

Task/select only required columns in historical market data query (#8110)

* Select only required columns in historical market data query

* Update changelog
pull/8116/head
Thomas Kaul 6 hours ago
committed by GitHub
parent
commit
5df95d68c7
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 8
      apps/api/src/services/data-provider/data-provider.service.ts

1
CHANGELOG.md

@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Extended the access to share the portfolio with the Model Context Protocol (MCP) to support the _View_ and the _View and manage_ permissions (experimental)
- Improved the performance of getting the historical market data by selecting only the required columns
## 3.83.0 - 2026-10-10

8
apps/api/src/services/data-provider/data-provider.service.ts

@ -408,9 +408,11 @@ export class DataProviderService implements OnModuleInit {
});
try {
const marketDataByGranularity: MarketData[] = await this.prismaService
.$queryRaw`
SELECT *
const marketDataByGranularity: Pick<
MarketData,
'dataSource' | 'date' | 'marketPrice' | 'symbol'
>[] = await this.prismaService.$queryRaw`
SELECT "dataSource", "date", "marketPrice", "symbol"
FROM "MarketData"
WHERE ("dataSource", "symbol") IN (${Prisma.join(assetProfileIdentifiers)})
${granularityQuery}

Loading…
Cancel
Save