Refs #28459 -- Improved performance of ValuesIterable.

This commit is contained in:
Sergey Fedoseev 2017-08-08 11:02:59 +05:00
parent b5d47b18f1
commit fb0bdff981
1 changed files with 2 additions and 1 deletions

View File

@ -102,8 +102,9 @@ class ValuesIterable(BaseIterable):
# extra(select=...) cols are always at the start of the row. # extra(select=...) cols are always at the start of the row.
names = extra_names + field_names + annotation_names names = extra_names + field_names + annotation_names
indexes = range(len(names))
for row in compiler.results_iter(): for row in compiler.results_iter():
yield dict(zip(names, row)) yield {names[i]: row[i] for i in indexes}
class ValuesListIterable(BaseIterable): class ValuesListIterable(BaseIterable):