DEV Community

Discussion on: 1 SQL Query You Should Stop Using

Collapse
 
austingil profile image
Austin Gil

OK, I figured as much. I wonder if there is a way to do something like DynamoDB where you would pass the ID to start after. So rather than an offset, you tell the DB like "get me the next 10 posts starting after this ID" but the ID is not like an integer.

Thread Thread
 
abdisalan_js profile image
Abdisalan

That would be pretty interesting! I'll have to look up that feature in Dynamo

Thread Thread
 
austingil profile image
Austin Gil

Yeah. Im not sure it's possible with SQL. Part of the reason Dynamo is so fast is due to the way it looks up data, but it also makes it very restricting on how you access that data and plan your primary keys. So far I still prefer SQL, but it's good to know about the strengths and weaknesses