[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

S Chapman

3/20/2007 11:41:00 AM

I have a table which is expected to grow very big over time ( in the
order of millions of rows). I have some standard queries that I need
to run to extract results from this table. I was hoping to create
database views using the queries. Is this going to impact the database
performance at all?


Or, given the size, is it better to run the queries (with filters)
every time results are needed.

Thank you.

2 Answers

Tibor Karaszi

3/20/2007 11:57:00 AM

0

The fact that you use a view instead of a table will probably not affect performance. Think of a
view as a macro.

However, if you mis-use a view, you will see bad performance. Say you have a view which do a join
over 12 tables. Then you have some operation which only need data from one table, but out of
laziness you use the view instead of going directly against the table. These are the cases you want
to watch out for when using views.

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/d...
http://www.solidqualitylea...


"S Chapman" <s_chapman47@hotmail.co.uk> wrote in message
news:1174390871.621843.291630@n59g2000hsh.googlegroups.com...
>I have a table which is expected to grow very big over time ( in the
> order of millions of rows). I have some standard queries that I need
> to run to extract results from this table. I was hoping to create
> database views using the queries. Is this going to impact the database
> performance at all?
>
>
> Or, given the size, is it better to run the queries (with filters)
> every time results are needed.
>
> Thank you.
>


cb meeks

3/20/2007 2:12:00 PM

0

Tibor is correct. Views are simply an easy way to shorten joins.
I usually create the joins by hand myself....but that's just me. :-)

---------------------------------
Need file/mirror hosting?
http://www.sig...



On Mar 20, 7:41 am, "S Chapman" <s_chapma...@hotmail.co.uk> wrote:
> I have a table which is expected to grow very big over time ( in the
> order of millions of rows). I have some standard queries that I need
> to run to extract results from this table. I was hoping to create
> database views using the queries. Is this going to impact the database
> performance at all?
>
> Or, given the size, is it better to run the queries (with filters)
> every time results are needed.
>
> Thank you.