Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

surajjd's avatar

same Query is running on every GET request

Hello artisans, I am developing one application with Laravel Nova. and debugging it with Laravel telescope. But all of sudden page load time increased. quick look as telescope reveals that every GET (including styles and scripts ) request is querying 'select * from users where id = 3 limit 1'. here 3 is logged in users. In single page load sql query is running hundreds of time depending on styles and scripts. how can I find what is triggering this query?

0 likes
3 replies
MichalOravec's avatar

It's just query for your authenticated user Auth:user() or auth()->user()

shez1983's avatar

it should ideally only be running one time on each request.. post some code of an example endpoint where its running repeatedly

surajjd's avatar

yes its running one per request but lets say I am visiting www.domain.com/nova/rescourse/course. If page has 56 (random number) of GET request it will query above query on every request (56 times.)

Please or to participate in this conversation.