id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux 27719,Add queryset.alias() to mimic .annotate() for aggregations without loading data,Marc Tamlyn,Alexandr Tatarinov,"At the moment the Expressions API currently does not allow creating a value for later use in the query without returning that data from the database. In some cases this can be quite expensive over the pipe, and can also influence query execution where functional indexes are involved. I would like to introduce an API like `alias()`, which does the same thing as `annotate()` to allow reuse in later querysets but doesn't return the value. To be explicit, we are changing a query from one of the form: `SELECT to_tsvector('english', ""some_field""), ""some"", ""other"", ""fields"" FROM ""table"" WHERE to_tsvector('english', ""some_field"") @@ plainto_tsquery(""search term"") ... LIMIT 10;` to one of the form: `SELECT ""some"", ""other"", ""fields"" FROM ""table"" WHERE to_tsvector('english', ""some_field"") @@ plainto_tsquery(""search term"") ... LIMIT 10;` ",New feature,closed,"Database layer (models, ORM)",dev,Normal,fixed,,,Ready for checkin,1,0,0,0,0,0