.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Update Performance-Problem

Posted By:      Posted Date: October 12, 2010    Points: 0   Category :Sql Server


I have got performance-problems with a statement, which has the following structure:

update tbl_b
set col1 = date1, col2 = int1, col3 = int2, col4 = varchar(3), col5 = null, col6 = null
   select col1, col2, col3, ...
   from tbl_b2
   where ...

) tbl_b2
inner join
   select col1, col2, col3, ...
   from tbl_b
   where ...
) tbl_b
  on x=y and a=b and c=d

The execution of this statement takes several hours.

The execution of the statement

select *
   select col1, col2, col3, ...
   from tbl_b2
   where ...) tbl_b2
inner join
   select col1, col2, col3, ...
   from tbl_b
   where ...
) tbl_b
  on x=y and a=b and c=d
takes one second.

Thank you for your help in advance!

View Complete Post

More Related Resource Links

Problem with master page and update panel (I think)



the app I am working with is made up of three nested master pages that have the following design:

The first master page ha only realize the HEADER, BODY and FOOTER divs.

The second one specialize the Body content placeholder and divide it in three more layers: NAVIGATOR, PAGE TITLE, BODY CONTENT.

The final layer specialize the BODY CONTENT in PAGE CONTENT and ACTIONS.

In one of my content pages I have (inside the PAGE CONTENT area) 

  • 1 Update Panel that contains a gridview object
  • 1 Update Panel that contains some HTML code to show in a PopupModalExtender

The PopupModalExtender can be either triggered from inside the gridView and also from a series of LinkButtons that are in the ACTIONS area.

The problem is that when the PopupModalExtender shows the FOOTER and the ACTIONS areas are not dimmed from the style I apply as background to the modal popup. An example of what I am trying to explain can be viewed in the following screenshot.

Why this is going to happen? Has anybody any suggestion on how to solve this problem?

Thanks a lot

Problem with list controls and update progress template



I have an update panel that surrounds a wizard control which I use in conjunction with a update progress control. Now my update progress control works perfectly, with my animated gif and div tag that lays over my wizard control when the user goes from step to step. However, there is a problem that I am struggling to solve. A number of my steps use controls like list boxes, and when the update progress control fires, the list control is not laying underneath my div an animated gif no matter how high a make my css z-index on the div.

Does anyone have a way of solving this?


Wickedly Strange .Net WPF Performance Problem Dissapeers with Windows 7 Performance Monitor Open

Hello Everyone, I have been developing one large and complex WPF application for 13 months now, all is going well and especially tonight as I now have some sort of clue or hint to what I have been seing now for quite some time.  Here is the rundown. 1) Running on i5 processor with 4GB RAM and Windows 7 2) The application was developed all in .Net 4.0, WPF C#. 3) It is heavily GUI intensive and also uses Entity Framework Detached for Database Access. 4) Is multi-threaded / multi-tasking. I am a nutcase when it comes to testing.  Since my graphical application heavily depends upon performance and determinsm (please somebody don't start with the C++ vs .Net on here) and has been performing great FOR THE MOST PART.  Every once in a while, I see that the application runs into the weeds for 5 or 6 seconds and the interface is unresponsive.  I have this thing tuned finely too.  Well now toward the end of development I have finally had to face that bug so to speak.  I can force it by clicking spastically on my buttons causing an event storm and making the system update the GUI.  SO!  Great start, I can now cause the problem on a regular basis (for you youngsters that is actually a good thing)!  Alright, so I start with the easiest investigative tool, CNTRL - ALT - DEL into Windows 7 Performance Monitor.  As you can tell from

SQL performance problem

I have a production database replicated on my local machine.  I run a select query for 10k rows.  On my local box the query takes less than half a second.  On production the query takes a full 4 seconds.  I have looked at the SQL Server Profiler and I see a lot of activity on production.  I would like to pinpoint exactly what or what group of items is causing the performance to degrade on production.  What are your suggestions? Local Environment:  SQL 2008, 32bit quad-core processor, 4gb ram Production:             SQL 2000, 32bit 8 processor cores, 16gb ram BrianMackey.NET

.net framework update problem

I've looked everywhere on MS support for other answers and ideas to resolve this over the past several weeks and nothing has helped.  In fact, I have more problems now than I did before I started.  My initial problem came to light when I attempted to install TurboTax 2009 on my Toshiba laptop running Vista Home Basic 32 bit.  The TurboTax installation aborted with a message that my .net framework was not properly installed and the included program to correct this also failed.  As I worked through the various suggestions on the Microsoft support site - KB923100 being the most applicable - I eventually succeeded in removing all versions of the .net framework.  However, when I attempted to reinstall them I could not.  The .net 1.1 reinstalled just fine but the .net 3.0 says I need to use the add/remove Windows components feature instead.  When I do, it fails to both install the .net features not installed, AND it fails to remove the one that is installed.  The .net 3.5 (dotNetFx35setup.exe) installation simply aborts.  Additionally, I get the exact same results no matter in which order I attempt to reinstall the .net framework versions.  All this hassle leaves me with the apparently related and business crippling problems of my Outlook Business Contact Manager failing "to init

Performance problem when passing a "nullable parameter"

Say @startDate and @endDate are my datetime parameters. If users does not want to limit the @startDate for example, he/she sends a null value to @startDate. Same goes for @endDate (and any other parameter). What I like doing: Select * From MyTable Where MyTable.Date >= IsNull(@startDate, MyTable.Date) And MyTable.Date <= IsNull(@endDate, MyTable.Date) The above looks nice as far as coding but when I look at the execution plan I'm surprised to see the my clustered index (that has it's first column as "MyTable.Date") is not used. instead I get an index scan. More frustrating is that the following works with an index seek and is much faster: Select * From MyTable Where MyTable.Date >= @startDate And MyTable.Date <= @endDate So what should I do? am I doing something wrong? I don't want to use dynamic sql because it's generally slower and prone to sql injection (is dynamic sql my only choise)? I don't want to use "if statements" because then i'd have to rewrite my code several times (in this case three combinations but some of my procedures have up to 8 "nullable" parameters). Or maybe there is another way of implementing what I call here "nullable parameters". obviously I preformance is crucial. thanks, Dror

Checkpointing and IO performance problem

Hi guys, Just a quick question regarding a problem i seem to be having at the moment which i can't seem to get my head around. I have started at an organisation which has a very basic setup. A clustered sql 2000 sp4 server with approx 90 databases on. Only a few of these have much traffic on and performance on the whole seems ok. The server is connected to a SAN with two LUNS being made available for the data and log drives. Performance in general is ok with disk latency for reads and writes on both luns around 10-20ms. There is a constant stream of reads using approx 1.5 - 2 mb per second from the data drive. On the odd instance disk read go upto 20-30mb per second and the disk queue may rise to 10 for a very short period of time but on the whole the disks seam to handle it and latency for the above peak may go upto 200ms. The problem seems to happen when checkpointing seems to happen. I have set the trace flags so i can see what database is checkpointing at any given time and when the highest throughput database checkpoints we see performance problems. Latency can go to 20-30 seconds for 30-60 seconds which effectively halts processing for this time. Errors start appearing in the sql log for files taking longer than 15s to respond. What's throwing me is that the throughput on the disks doesn't seem very high at these points. As an example checkpoint pages

problem with update panel height

I am using ajax update panel to show a tree without postback there is a label that is at the top of the panel I am hiding the label while showing the tree. document.getElementById('ctl00_phldDialogBody_lbltext').style.display = "none"; in the javascript but even after hiding the space of the label is still left blank causing the tree to be moved down pls help to fix it i want the tree to be at the same position

Performance problem when rendering in PDF, printing (SSRS2008)

Hi I have a report containing a rectangle/tablix attached to a dataset of course details. The rectange contains a number of text boxes showing course details (fields from the dataset: course title, department etc.) and a sub-report which is a list of students on that course (controlled by passing appropriate parameters). This worked fine until I decided I wanted one of the text boxes (course_title) to repeat on each page whilst printing. To achieve this I added a column group on course_title and set the header to repeat on each page, as suggested elsewhere on this forum. This works fine when simply viewing the report in BIDS or after deployment (SharePoint), but not when attempting to print, print preview or convert to another format (e.g. pdf). The report itself runs in a matter of seconds (<10) but the conversion runs for about 90 seconds before aborting (probably due to server settings) and in IE taking the browser down with it. I've tried not repeating the group header on each page but the problem persists, unless I remove the group altogether. I've also tried adding the student dataset and the list directly into the main report, but that created too many restrictions on the list (e.g. not enabling list column headers to be repeated on each page). Is there a known issues with grouping affecting the performance in this way? Are there other ways around any of these p

Linked server and sensitive to register name of table. Problem with UPDATE.

Hi All. I try to work with table with "sensitive to register" name through Linked Server (MSSQL 2005/2008) and get the problem with UPDATE statement. Reason: MSSQL generates UPDATE statement with "un-quoted" table name. With SELECT/INSERT/UPDATE - no any problems. ----- Linked Database Information: 1. Firebird 2.5 2. OLEDB Provider: IBProvider v3 3. Database dialect: 3 Metadata: CREATE GENERATOR "GEN_ID_TableWithMixName1"; CREATE TABLE "TableWithMixName1" ( TEST_ID INTEGER NOT NULL, "Col" VARCHAR(100), DUMMY_COL INTEGER, CONSTRAINT "PK_TableWithMixName1" PRIMARY KEY (TEST_ID) ); CREATE TRIGGER "BI_TableWithMixName1_TEST_ID" FOR "TableWithMixName1" BEFORE INSERT AS BEGIN IF(NEW."TEST_ID" IS NULL)THEN NEW."TEST_ID" =GEN_ID("GEN_ID_TableWithMixName1",1); END; ------- MSSQL Test 1. MSSQL: select * from IBP_TEST_FB25_D3_V3...TableWithMixName1; IBProvider: Command_Execute   SELECT "Tbl1002"."TEST_ID" "Col1004",         "Tbl1002"."Col" "Col1005",         "Tbl1002"."DUMMY_COL" "Col1006"   FROM "TableWithMixName1" "Tbl1002" No Problem ------- MSSQL Test 2. MSSQL: delete from IBP_TEST_FB25_D3_V3...Tabl

Problem installing Cumulative Update 6 for SQL 2008 SP1 on Windows XP

I am attempting to apply SQL Server 20008 SP1 Cumulative Update 6 on my Windows XP desktop. The update executable is unpacked and I get a brief flash of a Command Screen and then nothing. I have searched for any update files but have not found any. My Desktop Configuration: Windows XP SP3, Windows Installer 4. SQL Server 2008 SP1 Developer Edition. I am also attempting to install the Client Tools for SQL 2008R2 on this same desktop and am getting the same results. I click on SETUP and get a brief flash of the Command Screen and the installation does not continue. Internet searches speak of a problem with a registry entry in the Boostrap Key for a valid Setup directory, but this key exists in my desktop registry. Thanks,

Improving performance of UPDATE CUBE by executing preceding CREATE CACHE for the same cell / subcube

Hi All, Recently I came across one of suggestions by Microsoft Advisory consultant regarding optimization data write-back pattern for the SSAS cubes. It was recommended issuing CREATE CACHE command following by UPDATE CUBE for the same cell/subcube definition: CREATE CACHE FOR [MYCUBE] AS ("Cross join of all the dimension members defining subcube to be updated") UPDATE CUBE [MYCUBE] SET ("Cell") = 100, ("Another Cell") = 200,... etc. for every cell. This seems quite weird, but based on our benchmark the entire process (CREATE CACHE and UPDATE CUBE) takes less time than just UPDATE CACHE. Folks, can someone advice on the insights of the process? Shell this approach to be suggested for an enterprise-level planning application? Regards, -h

Problem with Update of Sharepoint Taxonomy Fields in custom developed Content Types

Dear all, we developed an solution on sharepoint 2010 for one of our customers with custom lists and content types with fields from the managed meta data store. As recommended we developed everything in features & solutions so that easy deployment is possible. Adding metadata to the termstore seems to work without problems, but today we stepped over an confusing issue: Our customer changed the default label of an term in the metadata term store, but the label did not change in listviews and detailviews of items in the specific sitecollection. In editview we see the correct label. After searching a while we discovered the connection between the sitecollection and the term store, the hidden Taxonomylist (/Lists/TaxonomyHiddenList/AllItems.aspx) in the sitecollection, which seems to map the terms. After testing we discovered that the term/label did also not change in the hidden taxonomy list. The Timerjob “Taxonomy Update Scheduler“ is running hourly with success and we also tried to start the job manually, but the label did not change in the hidden list. Also there are no errors in the logfiles in verbose mode. We also tested to create a managed metadata field manually, put it in a list and after that, changed the label. For whatever reason the update of labels on manually created fields works without a problem. Our lists, content types etc get created pr

update panel and jquery problem

I m working on JQuery, I have one UserControl in that I have taken one button(it is present inside an updatePanel).  when i m clicking on button on that time i want to show alert from server side for that i have written-  ScriptManager sm = ScriptManager.GetCurrent(Page); string strScript = "alert('hi')"; ScriptManager.RegisterStartupScript(this, typeof(UserControl_FrmUConFriendList), "AlertKey", strScript , true); But it is not working, if i m removing updatePanel then it is working. So plz help me. Thank's in advance.    

How To Update Database When The System Shut Down By Light Problem

Hi,I want to update the User LoggedIn Status to 'False', when the system shut down by light problem, or when the user click the 'Browser Close Button'Please help me in details.Thanks in advance.

Performance problem with date range JOINs



when I am joining two tables where one table has two columns which specify a date range and the other table has one column with a single date which must be in that range for a join, then the performance is not so hot. The T-SQL example only shows the basic query scheme, in reality there are appropriate indexes (but not on the date columns since I found them not helpful) and the DateRange column has about 100 mio rows and the Incident table about 200,000 rows. The query currently takes hours, I must speed it up by at least factor 10.

TIA for any ideas. Regards

	[DateRangeID] [int] NOT NULL PRIMARY KEY,
	[RangeTypeID] [smallint] NOT NULL,
	[StartDate] [date] NOT NULL,
	[EndDate] [date] NOT NULL)

	[IncidentID] [int] NOT NU

Problem in Update and delete row



i am new in linq and i want update and delete table row by linq but when table contain forign key it show error casecading is not valid but all are correct if table not contain every thnk is correct

my syntax is

var matchedNetworkGroup = (from NetworkGroup in dataContext.GetTable<ob_NetworkGroup>()
                                           where NetworkGroup.GroupID == id
                                           select NetworkGroup).SingleOrDefault();



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend