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

James Taylor commented on PHOENIX-3226:
---------------------------------------

Part of the reason you're seeing this is that you're using a rather primitive 
SQL client (sqlline). It's a valid request for sqlline (to fail a query that'll 
return too much data), but with Phoenix, a client would use JDBC to step 
through as many rows as they'd like. Perhaps after the tenth resultSet.next() 
call they'd stop, or perhaps there's a smarter client which pages results (but 
doing N next() calls each time). Perhaps they didn't include a limit because 
they're not sure how many rows they need to step through. The SQuirrel client 
is a little smarter in that it uses a default limit of 100.

There's a smaller category of queries, like a post aggregation on a huge join, 
which would fit into this category since they need to see all rows on the 
client before producing a result. I think as long as a query can be canceled 
while running, we should be ok.

> Phoenix should have an option to fail a query that would ship large amounts 
> of data to the client.
> --------------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-3226
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3226
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: Lars Hofhansl
>
> For many queries (merge joins, union all, some distincts, etc) Phoenix needs 
> to ship data to the client. It will happily try to do that even when that 
> requires shipping terrabytes of data to the poor client to do its final merge 
> sweep.
> Phoenix should have an option to detect these cases (from the stats and the 
> query plan), and simply - and optionally - fail the query immediately with 
> "Query too complicated", or "Query too slow", or something.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to