[ 
https://issues.apache.org/jira/browse/CASSANDRA-5649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13697154#comment-13697154
 ] 

Sylvain Lebresne commented on CASSANDRA-5649:
---------------------------------------------

Additional notes on the patch. We only return the result ResultSet in a prepare 
response in the case of select. Meaning, we don't do it for the result sets 
return by conditional updates, but in that case we can't predict what the 
returned columns will be.

There is also the issue of "SELECT * FROM ...". What if the drop/add a column? 
After checking, it's actually fine because the set of columns returned in the 
resultSet is computed during preparation of the statement.

Lastly, the patch allow the no_metadata flag for QUERY messages too, which is 
obviously much less useful, but it kind of makes to have it there for symmetry 
(and it takes no space since it's just a bit flag from a byte the QUERY 
messages have anyway), and I figured, maybe smart high level clients that 
generate the query can actually easily compute the metadata of the resultSet 
(it's not really rocket science) and so it could be useful in the long run.
                
> Move resultset type information into prepare, not execute
> ---------------------------------------------------------
>
>                 Key: CASSANDRA-5649
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5649
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Jonathan Ellis
>            Assignee: Sylvain Lebresne
>             Fix For: 2.0 beta 1
>
>
> Native protocol 1.0 sends type information on execute.  This is a minor 
> inefficiency for large resultsets; unfortunately, single-row resultsets are 
> common.
> This does represent a performance regression from Thrift; Thrift does not 
> send type information at all.  (Bad for driver complexity, but good for 
> performance.)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to