dbTalk Databases Forums  

Re: View or Not Views

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Re: View or Not Views in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
amish
 
Posts: n/a

Default Re: View or Not Views - 12-20-2006 , 07:36 AM







MIB wrote:
Quote:
In my project we are using OLAP for some reports and just SQL with others
tools for operational reporting.
To create my cube, i'm using view. But for my operationl report should i use
view or not. I'm wondering concerning performance of the view.
When i'm using a view, SQL Server create a physical table somewhere in
memory, so for a fact table i'will use a lot of storage space for nothing.
What are you advice ??

Unless indexed, a view does not exist as a stored set of data values in
a database.
When you reference it , it just execute like other SQL Qeury. SQL
Server is not creating any physical table and handle it like other TSQL
Statement. So, you can use views in your reports.

Regards
Amish Shah
http://shahamishm.tripod.com



Reply With Quote
  #2  
Old   
Jeje
 
Posts: n/a

Default Re: View or Not Views - 12-20-2006 , 09:54 PM






no, an indexed view take the space of the index + related content.
and an indexed view is usefull when there is group by clause.
Like storing sum of sales by month and store, this indexed view will takes
few Kb or Mb (while the source table contains day, product, promotion etc...
info)

So an indexed view will take less space then the original tables.

if your indexed view as the same size of you original tables its because
your view contains the same level of detail as your source table, then there
is no advantage of using indexed views.

a view as the performance of the source tables and the indexes of these
table. SQL server create a "table" in memory only when the query use order
by or group by clause. SQL Server use the tempdb database to store temporary
results and do the required calculations, but its a per-session "table", and
you can't access or use these result directly (only the internal SQL cache
will helps you). Simple queries don't required the usage of the tempdb
database.
Badly designed SQL statement can produce a huge tempdb usage, so take the
time to create good queries.

For your reporting side, I recommend to use your cube as the source of the
report instead-of the database. The performance advantage will be very high.
If you really want to access the database in your reports and you always
access aggregated data, then create pre-aggregated tables to store the
result and use these tables instead of you 500Gb table.

"MIB" <MIB (AT) discussions (DOT) microsoft.com> wrote

Quote:
Thank you for your answer.
If I create an indexed view, i will have a stored set of data so i wil
increase the disk space needs. If my fact table is 500Go, i will need
500Go
for my view, Is it true?

"amish" wrote:


MIB wrote:
In my project we are using OLAP for some reports and just SQL with
others
tools for operational reporting.
To create my cube, i'm using view. But for my operationl report should
i use
view or not. I'm wondering concerning performance of the view.
When i'm using a view, SQL Server create a physical table somewhere in
memory, so for a fact table i'will use a lot of storage space for
nothing.
What are you advice ??


Unless indexed, a view does not exist as a stored set of data values in
a database.
When you reference it , it just execute like other SQL Qeury. SQL
Server is not creating any physical table and handle it like other TSQL
Statement. So, you can use views in your reports.

Regards
Amish Shah
http://shahamishm.tripod.com



Reply With Quote
  #3  
Old   
MIB
 
Posts: n/a

Default Re: View or Not Views - 12-21-2006 , 12:51 AM



Thank you, but in my project we want to use tables directly just for
operational report, for aggregate data we plan to use MOLAP. A consultant
told us , that olap isn't for operational reporting (to many details).

"Jeje" wrote:

Quote:
no, an indexed view take the space of the index + related content.
and an indexed view is usefull when there is group by clause.
Like storing sum of sales by month and store, this indexed view will takes
few Kb or Mb (while the source table contains day, product, promotion etc...
info)

So an indexed view will take less space then the original tables.

if your indexed view as the same size of you original tables its because
your view contains the same level of detail as your source table, then there
is no advantage of using indexed views.

a view as the performance of the source tables and the indexes of these
table. SQL server create a "table" in memory only when the query use order
by or group by clause. SQL Server use the tempdb database to store temporary
results and do the required calculations, but its a per-session "table", and
you can't access or use these result directly (only the internal SQL cache
will helps you). Simple queries don't required the usage of the tempdb
database.
Badly designed SQL statement can produce a huge tempdb usage, so take the
time to create good queries.

For your reporting side, I recommend to use your cube as the source of the
report instead-of the database. The performance advantage will be very high.
If you really want to access the database in your reports and you always
access aggregated data, then create pre-aggregated tables to store the
result and use these tables instead of you 500Gb table.

"MIB" <MIB (AT) discussions (DOT) microsoft.com> wrote in message
news:AF27FDCA-4468-4A3D-A096-CE0DFF75ABD7 (AT) microsoft (DOT) com...
Thank you for your answer.
If I create an indexed view, i will have a stored set of data so i wil
increase the disk space needs. If my fact table is 500Go, i will need
500Go
for my view, Is it true?

"amish" wrote:


MIB wrote:
In my project we are using OLAP for some reports and just SQL with
others
tools for operational reporting.
To create my cube, i'm using view. But for my operationl report should
i use
view or not. I'm wondering concerning performance of the view.
When i'm using a view, SQL Server create a physical table somewhere in
memory, so for a fact table i'will use a lot of storage space for
nothing.
What are you advice ??


Unless indexed, a view does not exist as a stored set of data values in
a database.
When you reference it , it just execute like other SQL Qeury. SQL
Server is not creating any physical table and handle it like other TSQL
Statement. So, you can use views in your reports.

Regards
Amish Shah
http://shahamishm.tripod.com



Reply With Quote
  #4  
Old   
amish
 
Posts: n/a

Default Re: View or Not Views - 12-21-2006 , 11:14 PM



If you are not using OLAP then in that case you should use indexed
views to get aggregatged data, but OLAP will be definately better
choice then indexed views for aggregated data,which is more powerful,
dynamic and Interactive.

For detailed reports where you have to display row wise data then you
have to use OLTP database.

Regards
Amish Shah
http://shahamishm.tripod.com

MIB wrote:
Quote:
Thank you, but in my project we want to use tables directly just for
operational report, for aggregate data we plan to use MOLAP. A consultant
told us , that olap isn't for operational reporting (to many details).

"Jeje" wrote:

no, an indexed view take the space of the index + related content.
and an indexed view is usefull when there is group by clause.
Like storing sum of sales by month and store, this indexed view will takes
few Kb or Mb (while the source table contains day, product, promotion etc...
info)

So an indexed view will take less space then the original tables.

if your indexed view as the same size of you original tables its because
your view contains the same level of detail as your source table, then there
is no advantage of using indexed views.

a view as the performance of the source tables and the indexes of these
table. SQL server create a "table" in memory only when the query use order
by or group by clause. SQL Server use the tempdb database to store temporary
results and do the required calculations, but its a per-session "table", and
you can't access or use these result directly (only the internal SQL cache
will helps you). Simple queries don't required the usage of the tempdb
database.
Badly designed SQL statement can produce a huge tempdb usage, so take the
time to create good queries.

For your reporting side, I recommend to use your cube as the source of the
report instead-of the database. The performance advantage will be very high.
If you really want to access the database in your reports and you always
access aggregated data, then create pre-aggregated tables to store the
result and use these tables instead of you 500Gb table.

"MIB" <MIB (AT) discussions (DOT) microsoft.com> wrote in message
news:AF27FDCA-4468-4A3D-A096-CE0DFF75ABD7 (AT) microsoft (DOT) com...
Thank you for your answer.
If I create an indexed view, i will have a stored set of data so i wil
increase the disk space needs. If my fact table is 500Go, i will need
500Go
for my view, Is it true?

"amish" wrote:


MIB wrote:
In my project we are using OLAP for some reports and just SQL with
others
tools for operational reporting.
To create my cube, i'm using view. But for my operationl report should
i use
view or not. I'm wondering concerning performance of the view.
When i'm using a view, SQL Server create a physical table somewhere in
memory, so for a fact table i'will use a lot of storage space for
nothing.
What are you advice ??


Unless indexed, a view does not exist as a stored set of data values in
a database.
When you reference it , it just execute like other SQL Qeury. SQL
Server is not creating any physical table and handle it like other TSQL
Statement. So, you can use views in your reports.

Regards
Amish Shah
http://shahamishm.tripod.com




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.