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

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

Parallel plan for simple query ! Any solutions

Posted By:      Posted Date: September 29, 2010    Points: 0   Category :Sql Server

I am getting a parallel plan for a simple query below. Any workarounds

	UPDATE tblProfile
	SET PlanName = NULL, PlanValue =NULL
	FROM tblProfile pfl
	INNER JOIN tblCustomerPlan ts 
		ON pfl.planID = ts.planID
	WHERE (ts.Name = 'VOID' OR ts.Name = 'IPDC')
	AND ProfileURN = @ProfileURN 

View Complete Post

More Related Resource Links

How to estimate "Minimum query plan threshold for considering queries for parallel execution(cost es



We have 4 QUAD core processors and we have set max degree of parellelism to 4(as suggested by Microsoft). As of now we are using the default value for "Minimum query plan threshold for considering queries for parallel execution(cost estimate)".

Please suggest how to estimate the best value for for "Minimum query plan threshold for considering queries for parallel execution(cost estimate)"?

Thanks in advance.



Forcing parallel plan for CPU limited queries

I have a simple query: INSERT tableB SELECT SomethingSlowFunction(value) FROM tableA SomethingSlowFunction is a bunch of trigonometric function calls on many columns of the table, all pure T-SQL, no CLR involved. The query is CPU limited (100% on one of the 8 CPUs). If I change the query a little bit (i.e. add a SORT BY) that will cause parallel execution but the sort will take a lot of resources (tempdb munching). Any tips?

how to create a List order and unourder a simple Sql Query

A Simple Query Pass to connection String 1 My Query is SELECT a.HD, a.HEAD, a.SH, a.SUBHEAD, a.TRK, a.TRACK, a.TGT, a.TARGET, a.PDC, a.DT_RELEASE, a.STATUS, a.COFROM V_HIERARCHY1 a   2,My Data is HD    HEAD    SH    SUBHEAD    TRK    TRACK    TGT    TARGET    PDC    DT_RELEASE    STATUS    COHR    HR    Rec    Records    Leave    Leave Records    HRL.0002    Quarterly Review    01.07.2010    04.07.2010    Planned    EdlinkHR    HR1    DB    Database    SAL    Salary    DDS.0001    Calculation of Monthly salary    08.08.2010    09.08.2010    WIP    EdlinkHR    HR    Rec    Records    Ind    Induction Records    HRI.0001    Completion of dossiers.    08.07.2010    10.07.2010    WIP    EdlinkHR    HR  

how to generate an Xml pass Simple query structure like

1. My sql query is        SELECT a.HD, a.HEAD, a.SH, a.SUBHEAD, a.TRK, a.TRACK, a.TGT, a.TARGET, a.PDC, a.DT_RELEASE, a.STATUS, a.COFROM V_HIERARCHY1 a2, My Data is HR    HR    Rec    Records    Leave    Leave Records    HRL.0001    Policy and Process for leave record.    27.06.2010    30.06.2010    WIP    EdlinkHR    HR    Rec    Records    Leave    Leave Records    HRL.0002    Quarterly Review    01.07.2010    04.07.2010    Planned    EdlinkHR    HR    DB    Database    SAL    Salary    DDS.0001    Calculation of Monthly salary    08.08.2010    09.08.2010    WIP    EdlinkHR    HR    Rec    Records    Ind    Induction Records    HRI.0001    Completion of dossiers.    08.07.2010    10.07.2010    WIP   &nbs

Query execution plan problem

Hi, I have encountered a problem with a query execution plan on MS SQL Server 2008. It is a simple query on a single table. The table has a primary key RNUM (number(10)) with a clustered index. The query is executed via ODBC using fast forward cursors and is constructed like this: select [field_list_here] from table_name where RNUM>@P and TYPE='A' order by RNUM. The field TYPE has 2 possible values and is not indexed. The table has about 2 000 000 rows of static data (only reads, no inserts and updates). For some time my query executes using the efficient query execution plan. Below a copy from Management Studio from an ad-hoc query: SELECT (0%) <- Clustered Index Seek  (100%) But after 2 days of executing other type of queries SQL Server starts to use other execution plan (live copy):                             Fetch query (0%) <- Clustered Index Seek [CWT_PrimaryKey] (0%)                            |                           \/ Fast forward (0%) <- Population quer

Weird query plan problem where total is over 100%

Hi All, I am looking at the query plan for a stored procedure and I am seeing things like 1400% on the execution plan, the stored procedure I believe is called within a loop quite a lot of times, but I don’t quite understand why the percentages will be over 100 for one section of the execution plan. Any explanation for this ? Thanks in advance.

Issue with one of simple query

Hi team, I have a issue in the one of my query select   * from Prod3 where pnumber in (select distinct Policy from prod3_excel) order by pnumber This query gives me 8361 records and there are 8419 records in Prod3 how can i get the remaining records in Prod3 that is 58? select * from Prod3 where pnumber not in (select distinct Policy from prod3_excel) order by pnumber why this is not working? Thanks, Eshwar

need a simple query

Hi All, I have a table with multiple rows but I want to select identical rows where createdon (datetime) date is less than one minute different for instance 1 - 299  - 1/9/2010 - 13:30:00 1 - 299  - 1/9/2010 - 13:30:14 Thanks  

Help to write very simple query...


How I can write this query ?

I have value = 1000

I wont to get all value from table [MHGROUP].CUSTOM2

from column CPARENT_ALIAS

all values which beginning with num 1000.



cmd2 = new SqlCommand("SELECT * FROM [MHGROUP].CUSTOM2 WHERE CPARENT_ALIAS ='" + value + "'", con2

simple query


I need maximum mark scored each students and min mark scored each students.

I have done this way...

select ID,max(mark),min(mark) from table1 group by ID

But i need more field as Class.... I dont want include class field in group by clause


problem with merge statement query and parallelism plan


I have the query below which is using a parallel query plan, I am not quite sure why its doing so, I think its to do with the design of the query but apart from adding indexes and specifying maxdop 1, I was wondering if there is anything else I can do in order to rewrite the query to be more efficient and stop the use of the parallel plan.


Thanks in advance.

MERGE tblPersonProfile merge_target
USING #newrecs	sourc ON merge_target.PersonURN = sourc.PersonURN AND [AddressURN]=AddressURN AND MatchCode =[ProfileMatchCode] 
INSERT (PersonURN, AddressURN, ProfileMatchCode)VALUES (sourc.PersonURN, sourc.AddressURN, sourc.MatchCode)

Query Plan handle is not matching in the query related system DMV's


Ent : SQL Server 2008 SP17

OS  : Windows Server 2008 Ent.Edt

While troubleshooting a performance issue for a Query (SP) I came across this weired thing that the Query Plan handle is not matching across all the Query related system DMV’s.


Senario with a simple query

For each executing Query a plan handle is generated in sys.dm_exec_connections (Column most_recent_sql_handle).Based on the sql_handle the q

simple recovery model, backup plan best practise

any guideline on backup plan for a simple recovery model? if there is no differential backup, only has daily full backup, when the sever crashes, will it lose all info after last backup? if the data file crashes, but log file exists ok, is it possible to restore info after last backup? such as tail log backup?

simple query


Hi Team,

I am always confused with one simple query

i have get the data which is not in a table B

select *from TableA where col1 in (select col1 from TableB)

how to get the data in tableA which is not in TableB

select *from TableA where col1 not in (select col1 from TableB) why this is not working?



Simple query on a table just hangs ...

We have a table that contains parameters for our DW jobs. I can do a "SELECT *" from this table which works fine. However, when we right click and view the "Top n" rows, the interface just hangs with a message "Executing Query. Waiting for response from data source". We have run a DBCC CHECKTABLE command on that table and it ran fine. Any ideas what the issue may be? We have even restarted the SQL Server (2008) and to no effect. We use the "Top n" interface to easily update parameters to run our jobs. Appreciate any help / feedback.
Jagannathan Santhanam

Reason as why should we read Graphical Query Execution plan from right to left?


Reason as why should we read Graphical Query Execution plan from right to left?

What is the reason for the right to left order?

Sivaprasad S http://sivasql.blogspot.com Please click the Mark as Answer button if a post solves your problem!

BIDS SQL 2008 sp2 "The query processor could not start the necessary thread resources for parallel q


These cubes have been working in SQL 2005 on another box.  I copied the SQL db and the SSAS Project over to this new box and a fresh install of SQL 2008, sp2 Std Ed, 32 bits. Box has Server 2003 R2 Enterprise Ed SP2,

• 2x 2.3GHZ
• 12GB RAM
• D: 120GB SSD Drive Partition For Data
• C: 73 GB Drive Partition for System
• 1 GB NIC

A few of the dimensions will not refresh, they give the message  
"The query processor could not start the necessary thread resources for parallel query execution.; 42000"
The dimension I have been testing has 34 attributes, all directly related to the key attribute, and no hierarchies. There are 246,000 unique members in the source table. If I make another dimension from the same source table, it refreshes fine as long as there are only a few attributes, but when I add the rest, I get this message again.

Drive C, where Visual Studio is installed, has 69 Gb free disk space. The SQL and SSAS data are on D also has 69 Gb free.

Why was SQL 2005 able to handle this, but SQL 2008 cannot? I am thinking of uninstalling 2008 and going back to SQL 2005. Other suggestions?





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