The Redshift query hangs indefinitely when executed through DBT, but it completes quickly when run from a SQL Client tool

Hello everyone,

In recent weeks, some queries in dbt on Redshift have been hanging. Even simple queries take nearly 20 hours to complete, and some are still running. However, running the same queries through any SQL Client tool only takes a few minutes.

dbt Core: 1.5.7
dbt Redshift: 1.5.11

Is anyone experiencing the same issue?