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
npx -y skills add jpcaparas/superpowers-laravel --skill performance-select-columnsAssembled 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