DEV Community

Discussion on: 1 SQL Query You Should Stop Using

Collapse
 
djsullenbarger profile image
David Sullenbarger

(sorry, I didn't actually read anything but the title) ... you could pull in all of the data at once and let your (application) code send it out in chunks which would mean you could write the SQL any way you wanted (code review should clean it up)

or if you have database access: write a function or procedure from that side to help.

using indexes (and partitioning for huge table) really helps

Collapse
 
abdisalan_js profile image
Abdisalan

I promise the rest of the article is good too 😂

Collapse
 
djsullenbarger profile image
David Sullenbarger

Ok, I read it :-)

I've never used 'offset' because it doesn't seem like a good idea to me (though I do keep an eye out for an actual use case) .. but I'm also writing apps that are used on a robust enterprise WAN and have access to ... well .. just about anything I could possibly need from a hardware prospective so YMMV