Re: [GENERAL] Function with limit and offset - PostgreSQL 9.3 - Mailing list pgsql-general

From David G. Johnston
Subject Re: [GENERAL] Function with limit and offset - PostgreSQL 9.3
Date
Msg-id CAKFQuwbKRLp7BwywcptmD-Ahpq1h=fQV_uyXitsgfDvF=x0VXg@mail.gmail.com
Whole thread Raw
In response to Re: [GENERAL] Function with limit and offset - PostgreSQL 9.3  (marcinha rocha <marciaestefanidarocha@hotmail.com>)
Responses Re: [GENERAL] Function with limit and offset - PostgreSQL 9.3
List pgsql-general
On Thursday, June 8, 2017, marcinha rocha <marciaestefanidarocha@hotmail.com> wrote:

On my original select, the row will have migrated = false. Maybe All I need to put is a limit 2000 and the query will do the rest?


You shoud try to avoid the for loop, but yes a limit 2000 on the for loop query should work since the migrated flag will ensure the same rows aren't selected again.

David J. 

pgsql-general by date:

Previous
From: marcinha rocha
Date:
Subject: Re: [GENERAL] Function with limit and offset - PostgreSQL 9.3
Next
From: marcinha rocha
Date:
Subject: Re: [GENERAL] Function with limit and offset - PostgreSQL 9.3