agentsclimarketplace

Performance select columns

Skill jpcaparas/superpowers-laravel/skills/performance-select-columns

Select only required columns to reduce memory and transfer costs; apply to base queries and relationsFrom its SKILL.md

Install
npx -y skills add jpcaparas/superpowers-laravel --skill performance-select-columns

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

0.5 KB, as published. Nobody here has run it

Select Only Needed Columns

Reduce payloads by selecting exact fields:

User::select(['id', 'name'])->paginate();

Post::with(['author:id,name'])->select(['id','author_id','title'])->get();
  • Avoid *; keep DTOs/resources aligned with selected fields
  • Combine with eager loading to avoid N+1

Keep looking

Skills are one crate of 621,573. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.