Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

224
Views
Is Paging efficient in Objectionjs orm?

On every paged query, I see 2 query one is query with limit and offset. One is count.

Does this have any performance issues on every request when there are multiple joins?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

JOINs may or may not be a problem. It depends on whether the JOIN must be completed before doing the pagination.

If the Optimizer cannot get to the OFFSET and LIMIT soon enough, it will have to generate all the possible rows, sort them, skip over OFFSET rows, then finally deliver LIMIT rows.

If the Optimizer can do better, then the first page is fast; the second page is twice as slow; etc. Each page is slower and slower because of having to step over all the previous pages.

That is, OFFSET is the real problem. It is better to "remember where you left off".

More discussion (aimed at MySQL; it may be awkward to map the fix to your framework layer): http://mysql.rjweb.org/doc.php/pagination

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!