Procedures running for longer times, but same Proc is running for 2 mins in redshift DB

Hi Team,

We have stored procedure which we are using in dbt core, when we call the procedure in database it runs in 1 min but when calling the same procedure from dbt model using in prehooks, its running for more than hour.

Can someone help here