May 23, 2019 at 2:16 am
how to calculate the RAM used while running a query, for example, I run the following code, how can I know the RAM used by this statement. thanks in advance!
select * from table1 t1 left join table2 t2
ON t1.f1=t2.f1 and t1.f2=t2.f2
where t1.f5='active'
May 24, 2019 at 8:18 am
Thanks for posting your issue and hopefully someone will answer soon.
This is an automated bump to increase visibility of your question.
May 25, 2019 at 3:40 am
thank you for your help!
Hoping to get an answer here.
September 15, 2020 at 12:51 am
Sorry for my bothering !
How to calculate the RAM used while running a query, for example, I run the following code, how can I know the RAM used by this statement. thanks in advance!
select * from table1 t1 left join table2 t2
ON t1.f1=t2.f1 and t1.f2=t2.f2
where t1.f5='active'
September 15, 2020 at 1:57 pm
(size of data table t1 + size of t2 join fields) * (number of rows in t2) ? SQL Server estimates it . Can be lower if data is streamed (max size for one record in table 1)
https://techcommunity.microsoft.com/t5/sql-server/understanding-sql-server-memory-grant/ba-p/383595
https://sqlperformance.com/2019/06/sql-memory/troubleshooting-variable-memory-grants
September 28, 2020 at 12:52 am
thank you so much, Jo pattyn!
September 28, 2020 at 3:17 am
Calculating the amount of RAM used by a query isn't a very common question and so my curiosity has been piqued quite a bit. Why did you need to know how much RAM was being used by a query?
As you say, hoping to get an answer here. 😀
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply