MCPcopy Index your code
hub / github.com/simstudioai/sim / withSeqscanOff

Function withSeqscanOff

apps/sim/lib/table/planner.ts:18–23  ·  view source on GitHub ↗
(fn: (trx: DbTransaction) => Promise<T>)

Source from the content-addressed store, hash-verified

16 * plan exists, the seq scan still runs.
17 */
18export async function withSeqscanOff<T>(fn: (trx: DbTransaction) => Promise<T>): Promise<T> {
19 return db.transaction(async (trx) => {
20 await trx.execute(sql`SET LOCAL enable_seqscan = off`)
21 return fn(trx)
22 })
23}

Callers 9

dispatcherStepFunction · 0.90
checkUniqueConstraintsDbFunction · 0.90
selectRowIdPageFunction · 0.90
selectRowDataPageFunction · 0.90
countRowsTenantBoundedFunction · 0.90
queryRowsFunction · 0.90
updateRowsByFilterFunction · 0.90
deleteRowsByFilterFunction · 0.90

Calls 2

executeMethod · 0.65
fnFunction · 0.50

Tested by

no test coverage detected