Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query: Combine QueryingEnumerable for regular and non composed FromSq… #16029

Merged
merged 1 commit into from
Jun 11, 2019

Conversation

smitpatel
Copy link
Contributor

…l case

@smitpatel
Copy link
Contributor Author

⏱ on @roji to run some perfs

@@ -104,6 +106,47 @@ public async ValueTask<bool> MoveNextAsync()
_relationalQueryContext.CommandLogger,
_cancellationToken);

if (selectExpression.IsNonComposedFromSql())
{
var projection = _selectExpression.Projection.ToList();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A possible optimization would be to have a non-allocating fast mode that just compares the column names and if they are already in the expected order doesn't create an index array otherwise it falls back to the remapping logic.
But we should measure whether this would be worth it. The most affected scenario would be queries that only return a single row.

@smitpatel smitpatel merged commit 1fe8d0d into master Jun 11, 2019
@smitpatel smitpatel deleted the smit/fromsql branch June 11, 2019 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants