<div dir="ltr">I was able to use the following query to get the Warehouse size used by the Serverless Task:<br><br>select <br> name<br> , query_history.warehouse_size<br> -- , query_history.query_text<br> -- , query_history.warehouse_name<br> , query_history.start_time<br> , query_history.rows_inserted<br> , query_history.credits_used_cloud_services<br> , query_history.*<br> --, query_history.warehouse_type<br> , query_history.total_elapsed_time / 60000 -- in minutes<br>from snowflake.account_usage.task_history<br>inner join snowflake.account_usage.query_history using (query_id)<br>where <a href="http://task_history.name">task_history.name</a> = 'SERVERLESS_TASK_NAME' -- replace with the task name<br> and start_time > current_date - 1<br>--order by start_time desc<br>limit 1;</div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Fri, Feb 7, 2025 at 11:14 AM Ali, Saqib <<a href="mailto:docbook.xml@gmail.com">docbook.xml@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">How do I check what WH size a serverless task is currently using? We saw a drastic increase in the credits used for a serverless task that was initially deployed with:<br><br>USER_TASK_MANAGED_INITIAL_WAREHOUSE_SIZE = 'XSMALL'<br><br>The query executed by this task, only takes 3-4 seconds on XSMALL WH</div>
</blockquote></div>