Monday, March 12, 2012

Memory usage

Hello,

I need to know which of the following two methods do need less RAM.

There are 2 big tables, each about 9 M rows, and 6 small dimension tables with each about 10 to 100 Rows. The dimension tables are joined by their id's with one of the big table.

The Structure of a dimension Table looks like

CarID (tinyint), Description (varchar(20))
1 BMW
2 Porsche

I want to join the 2 Big Tables in a materialized view. Later i will run queries like
select * into #temp from dbo.vw_materialized_view where Car = 'BMW'

So, back to my question, will such a query take less memory (ram) when i joined all 8 tables before I created the mat. view or will it take less when I only join the 2 big tables in a mat.view and later join the mat.view with the 6 dimension tables?

Hope you got that ;-)

Thank youmemory usage will be managed by sql server

If you create an index on a view, then that data will be stored just like a base table, so you incur more overhead and disk storage, or if it's small enough, in memory

But all of that is managed by sql server

And if you don't index the view and the joins afre simple enough, then it'll use the indexes on the table

What was the question again?

No comments:

Post a Comment