Skip to content

Commit

Permalink
Add a note
Browse files Browse the repository at this point in the history
  • Loading branch information
benjie committed Jan 14, 2025
1 parent 35ef6b5 commit 13f2bad
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions grafast/dataplan-pg/src/steps/pgSelect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3016,6 +3016,9 @@ function calculateLimitAndOffsetSQL(params: {
: null;
offsetValue = offset;
}
// PERF: consider changing from `${sql.literal(v)}` to
// `${sql.value(v)}::"int4"`. (The advantage being that fewer SQL queries are
// generated, and thus chances of reusing a query are greater.)
const limitSql =
limitValue == null ? sql.blank : sql`\nlimit ${sql.literal(limitValue)}`;
const offsetSql =
Expand Down

0 comments on commit 13f2bad

Please sign in to comment.