MutterCorp
MutterCorpNotice · Notícias
Programação·

An N+1 query can hide inside a batch

Outline already processed group members in batches of 100. But when a group was removed from a collection, its background job still fetched the collection and the user separately for each member. A full batch could make 200 database lookups inside that loop. I maintain Loadwise, an open-source static checker for JavaScript and TypeScript. Its performance scan pointed me to the loop. I followed the queries, filed the report, and Outline merged a change that batches the lookups. Original report ·…

Publicado no Notice. Categoria: Programação.

Notícias sobre o mesmo assunto em outras fontes