# Laravel Performance Select Columns

> Select only required columns to reduce memory and transfer costs; apply to base queries and relations

- Skill: `noartem/laravel-performance-select-columns-2` (Agent Skill)
- Install (CLI): `npx get-skill add noartem/laravel-performance-select-columns-2`
- Raw SKILL.md: https://api.skillmd.com/api/skills/noartem/laravel-performance-select-columns-2/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: noartem (https://skillmd.com/u/noartem)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/noartem/laravel-performance-select-columns-2

---


# Select Only Needed Columns

Reduce payloads by selecting exact fields:

```php
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

