LIMIT and OFFSET allow you to retrieve just a portion of the rows that are generated by the rest of the query: Greenplum WINDOW function ROW_NUMBER can also be used to limit the rows.
SELECT select_list FROM table_expression [LIMIT { number | ALL }] [OFFSET number] The gadget spec URL could not be found
The gadget spec URL could not be found The rows skipped by an OFFSET clause still have to be computed inside the server; therefore a large OFFSET can be inefficient. I have found that window functions are actually faster than OFFSET.SELECT * FROM sachi ORDER BY name LIMIT 10 OFFSET 500 SELECT * FROM (SELECT *, ROW_NUMBER() OVER (ORDER BY name ASC) AS rownum FROM sachi) AS foo WHERE rownum > 500 AND rownum <= 510 The gadget spec URL could not be found | The gadget spec URL could not be found |