Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

221
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda