Wednesday, March 7, 2012

Create Memory intense query

I need a query that will consume al lot of memory.
I have a server with 8GB of memory but it uses only 400MB.
I want to see SQL server using 5GB or something.
Can I accomplish this with the pubsdatabase?
Regards.A systematic way is to (1) create a database that is larger than the
allocated amount of memory, (2) have you query(ies) randomly touch all the
pages, and (3) run the queries from multiple clients. This will create memor
y
pressure. Note that it'll most likely create I/O pressure.
In your case, to consume 5GB of memory, you can create a bunch of temp
tables, populate them to 5GB, and kep the queries running on them to keep th
e
pages hot in memory. This is just one of many ways.
Linchi
"Zekske" wrote:

> I need a query that will consume al lot of memory.
> I have a server with 8GB of memory but it uses only 400MB.
> I want to see SQL server using 5GB or something.
> Can I accomplish this with the pubsdatabase?
> Regards.

No comments:

Post a Comment