Ash Allen
Nov 7, 2020

--

Hi Alex, I agree that it would probably be unusual for a webpage to require that many rows that selecting the fields would matter. However, for any background tasks that might be running in the background of the app (maybe as a scheduled job), selecting specific fields can lead to a performance improvement.

In a project I’ve worked on myself in the past that I inherited from someone else, by defining the necessary fields in a query that was being run a scheduled job, I managed to gain a 45% speed improvement. Although there would be other ways to speed up the scheduled job that could give a better speed increase, this method is quick to add and doesn’t require any huge refactoring of methods.

--

--

Ash Allen
Ash Allen

Written by Ash Allen

I’m a Laravel web developer based in the UK. I specialise in building websites and systems for small businesses to help them grow and increase their sales.

Responses (1)