IMO we would need to sort since, even though the keys are monotonically
increasing, it may not return the data in the same order. Depends on the
implementation and file format of the given db.

~ Bhupesh


_______________________________________________________

Bhupesh Chawda

E: bhup...@datatorrent.com | Twitter: @bhupeshsc

www.datatorrent.com  |  apex.apache.org



On Tue, Jun 27, 2017 at 9:16 AM, Thomas Weise <t...@apache.org> wrote:

> Hi,
>
> It seems the poll operator performs unnecessary operations in the case
> where the "key" column values in the source table are monotonic increasing.
> There should be no need to sort or do count selects. Instead it should be
> sufficient to just filter with the key range.
>
> Let's say the key column is a timestamp that is set by a trigger, one
> could use:
>
> SELECT ... WHERE UPDATE_DATE > "<LAST_SEEN_DATE>"
>
> Instead of operating with ORDER BY, OFFSET and LIMIT.
>
> Thanks
>
>
>

Reply via email to