Hi guys, how are you?
this piece of code:
$leads = app(GetCampaignLeadsAction::class)
->handle(campaign: $this->campaign)
->with('groupLeads')
->get;
);
basically does this query:
SELECT *
FROM group_lead
WHERE lead_id IN (SELECT id FROM leads WHERE campaign_id = 4462)
and the problem is the query, since I took it and threw it into the workbench.
What is happening is that depending on the number of leads that this query returns, the bank dies and returns nothing.
example: 400, 600, 700 leads, take 0.156 seconds to return the data. Now 1200, 1400 leads take 30 seconds (bank timeout) and return nothing! and there is not much difference from 1200 leads to 600, the time difference is 30x, there is something strange that I cannot identify!