Source code Cost Performance

SELECT * / over-fetching

Part of the Cost controls check · fix arrives as a pull request

What it is

A query selects every column, or fetches rows the caller does not use, on a path that runs frequently.

Why it matters

You pay for the bytes twice — egress out of the database and memory in the process — and the cost grows with the widest column in the table. A single large JSON or text field turns a cheap list endpoint into an expensive one.

How to fix it

Select the specific columns the caller needs. Where a list view only shows three fields, fetch three fields and load the rest on demand when a row is opened.

Run them all on your app

Connect your repo and your live services with read-only scopes. The first scan is free, and nothing changes without your approval.