DT
Drizzle Team10mo ago
nk

Question

export const db = drizzle(pg, {
schema: {
...userSchema,
/// ... like 15+ other schemas.
},
});
export const db = drizzle(pg, {
schema: {
...userSchema,
/// ... like 15+ other schemas.
},
});
Is this how you're supposed to do it? Or should I export the schema and use separate instances. It almost seems like using an instance for each one of my instances was faster by a ms or 2 than doing it like this, which is why I'm curious.
3 Replies
Angelelz
Angelelz10mo ago
What do you mean by separate instances? I would think that optimizing for 1 or 2 ms is not worth it. Most people just uses barrel imports/exports
nk
nkOP10mo ago
@Angelelz I mean multiple drizzle() with the same pg pool.
Angelelz
Angelelz10mo ago
What are you trying to achieve?
Want results from more Discord servers?
Add your server