Discussions

Expand all | Collapse all

how to give skip limit in mapd

  • 1.  how to give skip limit in mapd

    Posted 06-11-2019 00:43
    i am having 100 data i need to skip first 50 data how can i do this
    is there any option for skip limit 
    can you sent me an example
    #Examples


  • 2.  RE: how to give skip limit in mapd

    Posted 06-11-2019 03:31
    Edited by Candido Dessanti 06-11-2019 05:35
    Hi,

    do you mean you want to limit the response of your query to 100 rows and you want to skit the first 50?

    You have to use both the limit and offset clause; as

    select field1,filed2,sum(field3)
    from table1 join table 2 on id1=id2
    group by 1,2 order by 1
    limit 100 offset 50;

    If you want to do a straightforward projection query of a table without filtering, aggregation or sort, for performance reasons is better to use the pseudo column rowid.

    select *
    from table
    where rownum between 50 and 150;

    It's also going to work the same way using limit and offset, but the performances would be worse.



  • 3.  RE: how to give skip limit in mapd

    Posted 06-11-2019 05:56
    thank you i got it