Question

I'm running some aggregation queries on some very large tables in an OLAP environment. I'm currently bottlenecked by disk IO at 200 MB/s.

I'm doing these queries on a machine with 92 GB of RAM. Is there any SQL hint I can write into my query that basically tells SQL to load the entire table into RAM before execution?

Something like:

select * from myTable with (ramdisk)

I am using MS TSQL.

Was it helpful?

Solution

No. The database engine will do this automatically if it has enough space in the page cache.

You can set the amount of memory being used by using SQL Server Management Studio. Right click on the server, choose the memory option, and put a large number in the "Minimum Server Memory" box. If you have 92 Gbytes of RAM, then a number like 85,000 is probably good. You need to leave additional memory for the operating system and other services on the machine.

Assuming the table(s) fit into memory, this should facilitate processing. If they don't fit into memory, then you might have to take another approach.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top