Skip to content

Conversation

rouault
Copy link
Member

@rouault rouault commented Oct 20, 2025

@rouault rouault added this to the 3.12.0 milestone Oct 20, 2025
@rouault rouault added the funded through GSP Work funded through the GDAL Sponsorship Program label Oct 20, 2025
@jratike80
Copy link
Collaborator

jratike80 commented Oct 20, 2025

Does this PR also make the documentation https://gdal.org/en/stable/user/ogr_sql_dialect.html#order-by outdated or does is only affect OGRVRTUnionLayer?

Note that ORDER BY clauses cause two passes through the feature set. One to build an in-memory table of field values corresponded with feature ids, and a second pass to fetch the features by feature id in the sorted order. For formats which cannot efficiently randomly read features by feature id this can be a very expensive operation.

@rouault
Copy link
Member Author

rouault commented Oct 20, 2025

Does this PR also make the documentation https://gdal.org/en/stable/user/ogr_sql_dialect.html#order-by outdated

no this is still relevant. The optimization in this PR helps for OGRVRTUnionLayer, but only if underlying sources have efficient random reading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

funded through GSP Work funded through the GDAL Sponsorship Program

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants