Re: Help with an Update Statment



The next question is why do you want to build a table that has to be
constantly updated when you can use a VIEW that is always right?

This is fundemental design - beginners 101.

Summary tables are used to assist performance and scalability.

It could often take 20 seconds - 5 hours to work out the aggregations depending on the data set and the complexity of the calculations.

In OLTP data is read many many more times than it is written.

Now imagine your query method took 10 seconds to run for a single user; 100 users running the same query would flat line your CPU and probably push the query time out into minutes - not very scalable.

Unfortunetly because you are classroom based you don't see these real world problems; you are best getting out and doing a beginners programming job for a couple of years to get the necessary fundementals.

--
Tony Rogerson, SQL Server MVP
http://sqlblogcasts.com/blogs/tonyrogerson
[Ramblings from the field from a SQL consultant]
http://sqlserverfaq.com
[UK SQL User Community]

.



Relevant Pages

  • "30 Second Query Timeouts"
    ... When running a query using views from a DB2 link server ... within SQL 2000 server I get a query time out error. ...
    (microsoft.public.sqlserver.odbc)
  • Re: linq to sql duplicate select statements
    ... unlike an IEnumerable linq query, which walks the objects to produce the query collection (the walk is done at query time), the linq to sql query result is an expression parse tree. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: DBMS and lisp, etc.
    ... Naively implemented with SQL, again for 10 ... (1 query for the initial orders, 1 query for each order for its ... soon as you upgrade to the SQL database. ... (eq (order-customer orderA) ...
    (comp.lang.lisp)
  • Re: Populating a list -- table structure?
    ... I had made a report already and figured out about adding the ... your responce below, but thanks to your help with SQL, I was able to get the ... It takes a summary from a select query and gives the ... KitID, long integer ...
    (microsoft.public.access.forms)
  • How do I do Paging through a large dataset via Stored Procedures
    ... Paging by dynamically altering the SQL Query ... Create stored procedures ... SELECT * FROM STUDENTS ...
    (microsoft.public.dotnet.framework.adonet)