phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Subramanyam Satyanarayana <>
Subject Re: Pagination with Phoenix
Date Thu, 18 Feb 2016 01:18:14 GMT
Thanks all for the responses. We will incorporate the suggestions in our design. Much appreciated


From: Sachin Katakdound <<>>
Reply-To: "<>" <<>>
Date: Wednesday, February 17, 2016 at 11:53 AM
To: "<>" <<>>
Subject: Re: Pagination with Phoenix

We used a similar approach;

If your data set never changes (no inserts or deletes) then you can cache the keys before
hand and use them for pagination.
However for our use case data changes so we found a work around with sub query and nth value

Roughly like this,

Select * from table where col1='ABC' and (pkey1) > (select nth_value(pkey1,100) within
group (order by key1, pkey1) from table where col1='ABC') order by key1, pkey1 limit 100


On Feb 17, 2016, at 2:15 PM, James Taylor <<>>

See and the unit test for QueryMoreIT. The row value
constructor (RVC) was implemented specifically to provide an efficient means of pagination
over HBase data.


On Wed, Feb 17, 2016 at 10:54 AM, Steve Terrell <<>>
I was just thinking about this today.  I was going to try to implement it by using a LIMIT
<number of rows> on every query, with an addition of

  WHERE (rowkey_field_1 > last_rowkey_field_1_value_from_previous_query) OR (rowkey_field_2
> last_rowkey_field_2_value_from_previous_query) OR …

But I haven't tried it yet.

On Wed, Feb 17, 2016 at 12:47 PM, Subramanyam Satyanarayana <<>>
We have micro services built within Play  that generate Phoenix queries to serve RESTful requests.
We are trying to figure a good way to implement pagination in the services.

We were curious to know if there is any prescribed way of implementing either Row Keys ( to
determine start & stop conditions for scan)  and/or indexes to help support this. Happy
to share more details.
Manager, Platform Services
Metabiota, Inc. (<>)

CONFIDENTIALITY NOTICE: The information contained in this electronic mail (email) transmission
(including attachments), is intended by Metabiota for the use of the named individual or entity
to which it is addressed and may contain information that is privileged or otherwise confidential.
It is not intended for transmission to, or receipt by, any individual or entity other than
the named addressee except as otherwise expressly permitted in this email transmission. If
you have received this email in error, please delete it without copying or forwarding it,
and notify the sender of the error by email reply.

View raw message