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:[email protected]]
Sent: Friday, May 15, 2015 11:19 AM
To: [email protected]
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
<[email protected]<mailto:[email protected]>>
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.