fetch

Set the fetch size of the query result set. If fetch size set is less than the result set, remaining results can be seen using next command.

gfsh:/Orders>select * from /Orders

Row  Id  Time                          Quantity  ProductId  CustomerId  Discount
---  --  ----                          --------  ---------  ----------  --------
1    1   Fri Apr 10 00:00:00 IST 2009  10        HSHD101    CUST96874   0.5
2    10  Fri Jul 06 15:22:03 IST 2007  5         HSHD303    CUST13541   0.4
3    6   Sun Jan 24 21:22:03 IST 2010  53        HSHD102    CUST96874   5.0
4    8   Sat Jun 05 23:22:03 IST 2010  9         ELEX203    CUST34571   0.2
5    9   Fri Sep 04 10:22:03 IST 2009  7         ELEX302    CUST10401   0.1
6    4   Wed Jul 06 15:22:03 IST 2011  5         HSHD201    CUST13541   0.4
7    11  Sat Aug 01 01:22:03 IST 2009  2         ELEX101    CUST34571   0.1
8    3   Mon Sep 14 10:22:03 IST 2009  7         HSHD302    CUST96874   0.1
9    12  Thu Jan 13 21:22:03 IST 2011  53        ELEX304    CUST34571   5.0
10   7   Mon Jun 30 11:22:03 IST 2008  10        HSHD303    CUST10401   0.5
11   5   Sun Aug 01 01:22:03 IST 2010  2         HSHD204    CUST34571   0.1
12   2   Sun Jun 12 23:22:03 IST 2011  9         HSHD102    CUST13541   0.2

Class: data.Order
Fetch size: 50, Limit: 1000
   Results: 12, Returned: 12/12
elapsed (msec): 33

gfsh:/Orders>fetch 5

gfsh:/Orders>select * from /Orders

Row  Id  Time                          Quantity  ProductId  CustomerId  Discount
---  --  ----                          --------  ---------  ----------  --------
1    1   Fri Apr 10 00:00:00 IST 2009  10        HSHD101    CUST96874   0.5
2    6   Sun Jan 24 21:22:03 IST 2010  53        HSHD102    CUST96874   5.0
3    10  Fri Jul 06 15:22:03 IST 2007  5         HSHD303    CUST13541   0.4
4    8   Sat Jun 05 23:22:03 IST 2010  9         ELEX203    CUST34571   0.2
5    5   Sun Aug 01 01:22:03 IST 2010  2         HSHD204    CUST34571   0.1

Class: data.Order
Fetch size: 5, Limit: 1000
   Results: 5, Returned: 5/12
elapsed (msec): 34