Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old June 20th, 2004, 08:08 AM
Authorized User
 
Join Date: Mar 2004
Location: Amman, , Jordan.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to deyakhatib
Default Performance issue

Hi all,

I need to know if I have a prtitioned DB is it better to insert rows into the View or I should insert directly into the table that meet the constraints using execute statment, note that our system is inserting new rows each minute with too many records.

  #2 (permalink)  
Old June 21st, 2004, 09:15 AM
Friend of Wrox
Points: 3,489, Level: 24
Points: 3,489, Level: 24 Points: 3,489, Level: 24 Points: 3,489, Level: 24
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Central, NJ, USA.
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

I'd say we need more data than this to answer the question.

Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
  #3 (permalink)  
Old June 21st, 2004, 10:47 PM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Location: Clarksville, TN, USA.
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I would say that the answer is it depends. It depends on how you are doing the update, what the front end is, etc. If you are using an updatable view to pull the data for your users to view, and then give then the ability to update, then all you need is an update statement in your recordset instead of pulling another recordset for your updating.

If you are using stored procedures to show the data to the user and then you want to do an update, then use the table. This would be my preference, since stored procedures are faster and they are read only. I ussually use them to navigate to the dataset that needs to be updated and only when there is an update do I call the table in a recordset.

Some times you have to use stored procbedures for inserts and updates as well. If you update an updateable view, all the constraints from the table will still apply. So if you only accept M or F for gender, this will still be the case if you update the view. Instead of triggers can be used with non updatable views, but triggers do have a performance drawback.

It really depends on your implementation.



Sal


Similar Threads
Thread Thread Starter Forum Replies Last Post
performance issue with the xsl given here anboss XSLT 11 July 16th, 2008 03:05 AM
performance issue keyvanjan Classic ASP Basics 0 May 23rd, 2006 10:57 AM
Performance Issue of Execution bjohnjebastin ASP.NET 1.0 and 1.1 Basics 1 November 14th, 2005 11:18 AM
issue of performance alyeng2000 SQL Server 2000 6 August 20th, 2004 01:17 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.