You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@phoenix.apache.org by "Chagarlamudi, Prasanth" <pr...@epsilon.com> on 2015/05/15 18:14:46 UTC

Phoenix's behavior when applying limit to the query

Hello,
I would appreciate if someone could help with my question regarding pheonix's functionality.

        Created a phoenix table and inserted 100,000 records(assume these are spread across different regions region servers).
        Now, when I issue a select query with a limit n..something like this
                select * from <phoenix_table_name> limit 1000;
        What would be phoenix's behavior?
                -Does it read the all the data(from all the region servers) on side server side, then apply limit to dataset and send the 1000 records to the client?
                or
                -Does it bring all the data set to the client and then apply the limit?

Thanks in advance
Prasanth Chagarlamudi



________________________________

This e-mail and files transmitted with it are confidential, and are intended solely for the use of the individual or entity to whom this e-mail is addressed. If you are not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you are not one of the named recipient(s) or otherwise have reason to believe that you received this message in error, please immediately notify sender by e-mail, and destroy the original message. Thank You.

RE: Phoenix's behavior when applying limit to the query

Posted by "Chagarlamudi, Prasanth" <pr...@epsilon.com>.
Samarth,
Created a table with three columns
0: jdbc:phoenix:localhost> create table employees_2015_phoenix (id varchar primary key, first_name varchar, last_name varchar) DEFAULT_COLUMN_FAMILY='default' SPLIT ON ('10', '20', '30', '40');

Loaded data from a csv file
[phoenix_user@<hostname> bin]$ ./psql.py  -t EMPLOYEES_2015_PHOENIX  <zookeeper_hostname> customers.csv
csv columns from database.
CSV Upsert complete. 100000 rows upserted
Time: 14.52 sec(s)

Explain query came out this way.
0: jdbc:phoenix:localhost> EXPLAIN SELECT * FROM EMPLOYEES_2015_PHOENIX LIMIT 1000;
+------------+
|    PLAN    |
+------------+
| CLIENT PARALLEL 25-WAY FULL SCAN OVER EMPLOYEES_2015_PHOENIX |
|     SERVER FILTER BY PageFilter 1000 |
|     SERVER 1000 ROW LIMIT |
| CLIENT 1000 ROW LIMIT |
+------------+

Thank you for stepping in to help me with my question.
Prasanth


From: Samarth Jain [mailto:samarth.jain@gmail.com]
Sent: Friday, May 15, 2015 11:19 AM
To: user@phoenix.apache.org
Subject: Re: Phoenix's behavior when applying limit to the query

Prasanth,

To help us answer you better please let us know your table schema. Also what does EXPLAIN select * from <phoenix_table_name> limit 1000; tell you?

-Samarth

On Friday, May 15, 2015, Chagarlamudi, Prasanth <pr...@epsilon.com>> wrote:
Hello,
I would appreciate if someone could help with my question regarding pheonix's functionality.

        Created a phoenix table and inserted 100,000 records(assume these are spread across different regions region servers).
        Now, when I issue a select query with a limit n..something like this
                select * from <phoenix_table_name> limit 1000;
        What would be phoenix's behavior?
                -Does it read the all the data(from all the region servers) on side server side, then apply limit to dataset and send the 1000 records to the client?
                or
                -Does it bring all the data set to the client and then apply the limit?

Thanks in advance
Prasanth Chagarlamudi



________________________________

This e-mail and files transmitted with it are confidential, and are intended solely for the use of the individual or entity to whom this e-mail is addressed. If you are not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you are not one of the named recipient(s) or otherwise have reason to believe that you received this message in error, please immediately notify sender by e-mail, and destroy the original message. Thank You.

________________________________

This e-mail and files transmitted with it are confidential, and are intended solely for the use of the individual or entity to whom this e-mail is addressed. If you are not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you are not one of the named recipient(s) or otherwise have reason to believe that you received this message in error, please immediately notify sender by e-mail, and destroy the original message. Thank You.

Re: Phoenix's behavior when applying limit to the query

Posted by Samarth Jain <sa...@gmail.com>.
Prasanth,

To help us answer you better please let us know your table schema. Also
what does EXPLAIN select * from <phoenix_table_name> limit 1000; tell you?

-Samarth

On Friday, May 15, 2015, Chagarlamudi, Prasanth <
prasanth.chagarlamudi@epsilon.com> wrote:

> Hello,
> I would appreciate if someone could help with my question regarding
> pheonix's functionality.
>
>         Created a phoenix table and inserted 100,000 records(assume these
> are spread across different regions region servers).
>         Now, when I issue a select query with a limit n..something like
> this
>                 select * from <phoenix_table_name> limit 1000;
>         What would be phoenix's behavior?
>                 -Does it read the all the data(from all the region
> servers) on side server side, then apply limit to dataset and send the 1000
> records to the client?
>                 or
>                 -Does it bring all the data set to the client and then
> apply the limit?
>
> Thanks in advance
> Prasanth Chagarlamudi
>
>
>
> ________________________________
>
> This e-mail and files transmitted with it are confidential, and are
> intended solely for the use of the individual or entity to whom this e-mail
> is addressed. If you are not the intended recipient, or the employee or
> agent responsible to deliver it to the intended recipient, you are hereby
> notified that any dissemination, distribution or copying of this
> communication is strictly prohibited. If you are not one of the named
> recipient(s) or otherwise have reason to believe that you received this
> message in error, please immediately notify sender by e-mail, and destroy
> the original message. Thank You.
>