Is it advised to always specify columns

When making queries (db.query or db.select), it is generally best practice to specify the return columns you want? or will that not impact performance in most cases (unless your expected return query is large)
1 Reply
PizzaConsole
PizzaConsole16mo ago
https://orm.drizzle.team/docs/select#basic-and-partial-select
Drizzle always explicitly lists columns in the select clause instead of using select *. This is required internally to guarantee the fields order in the query result, and is also generally considered a good practice.
Drizzle ORM - next gen TypeScript ORM
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.

Did you find this page helpful?