dbTalk Databases Forums  

Cost of using views

comp.database.oracle comp.database.oracle


Discuss Cost of using views in the comp.database.oracle forum.



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

Default Cost of using views - 09-05-2006 , 09:45 AM






Hi everyone

I would like to know if using several views for a complicated query is
slower than placing all the code in one large query.

I had heard that views were expensive in terms of performance, but I
find them used quite a bit.

Jeff

Reply With Quote
  #2  
Old   
Jim Kennedy
 
Posts: n/a

Default Re: Cost of using views - 09-06-2006 , 12:14 AM







"Jeff User" <jeff31162 (AT) hotmail (DOT) com> wrote

Quote:
Hi everyone

I would like to know if using several views for a complicated query is
slower than placing all the code in one large query.

I had heard that views were expensive in terms of performance, but I
find them used quite a bit.

Jeff
You would have to test it, but in my experience no. a view is resolved as a
query.
Jim




Reply With Quote
  #3  
Old   
Jim K
 
Posts: n/a

Default Re: Cost of using views - 09-12-2006 , 11:49 AM



Jeff, there is no more noticeable overhead using a view than for a
regular query.

If it's a really complicated query requiring data that does not change
heavily (more than daily), then you could use Materialized Views (MV --
aka snapshots), with a fast refresh each night.

At a customer of mine, I changed their regular query to a MV, reducing
processing time from 129 minutes to 7 for a huge job each night. The
users then queried the MV and their users' requests returned in an
average of 23 seconds, down from 9 to 14 minutes depending on system load.

The only drawback is, it's a point-in-time snapshot as of the time it
was rebuilt, so the users have to understand it will not necessarily be
as of that moment. Depending on the complexity, you can also have it
fast refresh several times each day.

Jim
Principal Consultant
KCS
http://www.KotanConsulting.com


Jeff User wrote:
Quote:
Hi everyone

I would like to know if using several views for a complicated query is
slower than placing all the code in one large query.

I had heard that views were expensive in terms of performance, but I
find them used quite a bit.

Jeff

Reply With Quote
  #4  
Old   
Acme Acmeson
 
Posts: n/a

Default Re: Cost of using views - 09-12-2006 , 01:17 PM




"Jeff User" <jeff31162 (AT) hotmail (DOT) com> wrote

Quote:
Hi everyone

I would like to know if using several views for a complicated query is
slower than placing all the code in one large query.

I had heard that views were expensive in terms of performance, but I
find them used quite a bit.

Jeff
If you consider MV's as mentioned by Jim K then have a look at
http://www.dizwell.com/prod/node/31




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.