microsoft / fhir-server

A service that implements the FHIR standard
MIT License
1.18k stars 507 forks source link

Combine pairs of DateTime predicates on the same search parameter #3903

Closed feordin closed 3 months ago

feordin commented 3 months ago

Description

When we have a FHIR query like the following: ?issued=ge2024-04-22T00:00:00&issued=lt2024-04-23T00:00:00 We currently generate two CTE's in SQL and then join them. This is inefficient and can be improved if we combine the two conditions into one CTE.

Related issues

Addresses [issue AB#121039].

Testing

Manually tested against the example query. All other automated tests run for regression testing.

FHIR Team Checklist

Semver Change (docs)

Patch|Skip|Feature|Breaking (reason)

feordin commented 3 months ago

/azp run

azure-pipelines[bot] commented 3 months ago
Azure Pipelines successfully started running 1 pipeline(s).
feordin commented 3 months ago

/azp run

azure-pipelines[bot] commented 3 months ago
Azure Pipelines successfully started running 1 pipeline(s).
feordin commented 3 months ago

/azp run

azure-pipelines[bot] commented 3 months ago
Azure Pipelines successfully started running 1 pipeline(s).
feordin commented 3 months ago

/azp run

azure-pipelines[bot] commented 3 months ago
Azure Pipelines successfully started running 1 pipeline(s).