I have read Workaround for Offset 2000 limit on SOQL Query and sfdcfox's https://salesforce.stackexchange.com/a/22643/14880 does works for most cases.
BUT What if some records have same CreatedDate ( created via mass operation ) ?
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.Sign up to join this community
In that scenario best approach would be to use ID, as they are never unique.
SELECT Id, Name, CreatedDate FROM Account ORDER BY ID LIMIT 2000
At this point, you'll get your next 2000 records. You can rinse and repeat as necessary. If you want to go back a page, just reverse the order (but you'll also have to reverse the results):
SELECT Id, Name, CreatedDate FROM Account WHERE ID > "Last-Returned-ID" ORDER BY ID LIMIT 2000