﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2005 / SQL Server 2005 Performance Tuning  / need one doubt clarification application team trying to execute a simple query / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sun, 19 May 2013 23:13:46 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: need one doubt clarification application team trying to execute a simple query</title><link>http://www.sqlservercentral.com/Forums/Topic1388027-360-1.aspx</link><description>We need the execution plan as a SQLPLAN file.We also need the CREATE VIEW definitionWe also need the CREATE TABLE definition of all the tables in the query and or viewWe also need all the CREATE INDEX definitions of all the indexes on all the tables in the queryWe also need the FULL SQL STATEMENT used when generating the execution plan.Please follow the links in my signature, on posting performance problems and how to post code and data.  Without this we cannot help you further.Remember we cannot see what you can see.</description><pubDate>Mon, 03 Dec 2012 04:36:08 GMT</pubDate><dc:creator>anthony.green</dc:creator></item><item><title>RE: need one doubt clarification application team trying to execute a simple query</title><link>http://www.sqlservercentral.com/Forums/Topic1388027-360-1.aspx</link><description>the query is also in the execution plan out put and application team  frequently check this simple query to check the count ----&amp;gt;&amp;gt; select count(*) from acmt</description><pubDate>Mon, 03 Dec 2012 04:22:47 GMT</pubDate><dc:creator>naga.rohitkumar</dc:creator></item><item><title>RE: need one doubt clarification application team trying to execute a simple query</title><link>http://www.sqlservercentral.com/Forums/Topic1388027-360-1.aspx</link><description>Not a picture of the exec plan, which is fairly useless. The execution plan saved to a file. Plus the view definition, the table definitions, the index definitions.Please read the article that Opc posted in his first reply on this thread.</description><pubDate>Mon, 03 Dec 2012 04:04:34 GMT</pubDate><dc:creator>GilaMonster</dc:creator></item><item><title>RE: need one doubt clarification application team trying to execute a simple query</title><link>http://www.sqlservercentral.com/Forums/Topic1388027-360-1.aspx</link><description>[quote][b]naga.rohitkumar (12/3/2012)[/b][hr]it is a having indexes properly in both the tables[/quote] NO use of here as both the tables are going for table scan plus parallelism too for puling out heavy data. can you post the related query too ?</description><pubDate>Mon, 03 Dec 2012 03:58:35 GMT</pubDate><dc:creator>Bhuvnesh</dc:creator></item><item><title>RE: need one doubt clarification application team trying to execute a simple query</title><link>http://www.sqlservercentral.com/Forums/Topic1388027-360-1.aspx</link><description>here by the  below execution plan states that it is going for full table scan and taking 79% of table and first table is taking 117mb nearly and second table  is taking the 600mb nearly and it is a having indexes properly in both the tables</description><pubDate>Mon, 03 Dec 2012 03:49:32 GMT</pubDate><dc:creator>naga.rohitkumar</dc:creator></item><item><title>RE: need one doubt clarification application team trying to execute a simple query</title><link>http://www.sqlservercentral.com/Forums/Topic1388027-360-1.aspx</link><description>[quote][b]opc.three (11/27/2012)[/b][hr]Select count(*) with no where-clause means the entire table will require a scan. [/quote]It's a view, not a table (stated as such in a different thread).Naga, as Opc stated earlier, we need more information (not the same info posted again). The view definition, the table definitions, the index definitions, the execution plan.</description><pubDate>Tue, 27 Nov 2012 07:16:29 GMT</pubDate><dc:creator>GilaMonster</dc:creator></item><item><title>RE: need one doubt clarification application team trying to execute a simple query</title><link>http://www.sqlservercentral.com/Forums/Topic1388027-360-1.aspx</link><description>It could be any number of things but from the information you provided so far it sounds like you may be experiencing intermittent blocking. Select count(*) with no where-clause means the entire table will require a scan. There's really no way to make that go faster. If anything else is running that has an exclusive lock on any part of the table needed by the scan then the count(*) query will be forced to wait.[u][url=http://support.microsoft.com/kb/224453]INF: Understanding and resolving SQL Server blocking problems[/url][/u]How many rows are in the table? Start looking at what else is going on in the database when the query starts taking a long time. Forget Activity Monitor. Start getting familiar with the DMVsFrom [u][url=http://technet.microsoft.com/en-us/magazine/hh750281.aspx]SQL Server: Transaction Management[/url][/u][code="sql"]-- Look for blockingSELECT tl.resource_type , tl.resource_database_id , tl.resource_associated_entity_id , tl.request_mode , tl.request_session_id , wt.blocking_session_id , wt.wait_type , wt.wait_duration_msFROM sys.dm_tran_locks AS tl INNER JOIN sys.dm_os_waiting_tasks AS wt ON tl.lock_owner_address = wt.resource_addressORDER BY wait_duration_ms DESC ;[/code]</description><pubDate>Tue, 27 Nov 2012 03:56:12 GMT</pubDate><dc:creator>opc.three</dc:creator></item><item><title>RE: need one doubt clarification application team trying to execute a simple query</title><link>http://www.sqlservercentral.com/Forums/Topic1388027-360-1.aspx</link><description>select count(*) from acmt 1. if the query is getting slow to execute what should we check in activity monitor other than spid !2. can we trace any thing in the activity monitor lock by object if so what is it?</description><pubDate>Tue, 27 Nov 2012 02:47:01 GMT</pubDate><dc:creator>naga.rohitkumar</dc:creator></item><item><title>RE: need one doubt clarification application team trying to execute a simple query</title><link>http://www.sqlservercentral.com/Forums/Topic1388027-360-1.aspx</link><description>Please read Opc's post.</description><pubDate>Mon, 26 Nov 2012 00:29:57 GMT</pubDate><dc:creator>GilaMonster</dc:creator></item><item><title>RE: need one doubt clarification application team trying to execute a simple query</title><link>http://www.sqlservercentral.com/Forums/Topic1388027-360-1.aspx</link><description>this is the query select count(*) from acmt  when we execute this output has to display the records count in it but some times it is taking 12 to 20 mins also actuall execution time is 2 to 10 secs </description><pubDate>Mon, 26 Nov 2012 00:17:05 GMT</pubDate><dc:creator>naga.rohitkumar</dc:creator></item><item><title>RE: need one doubt clarification application team trying to execute a simple query</title><link>http://www.sqlservercentral.com/Forums/Topic1388027-360-1.aspx</link><description>[quote][b]naga.rohitkumar (11/22/2012)[/b][hr]or after rebuilding the table wheter we have to rearrrange the colums of the table which previous ly having[/quote]Order of columns in a table has no meaning.[quote]can we rebuild the index if we do so will it increase performance of the query[/quote]Probably not. To make a query run faster, tune the query. May involve rewriting the query, may involve indexes.Chapters 3, 6 and 7 [url]http://www.simple-talk.com/books/sql-books/troubleshooting-sql-server-a-guide-for-the-accidental-dba/[/url]and[url]http://www.simple-talk.com/sql/performance/finding-the-causes-of-poor-performance-in-sql-server,-part-1/[/url][url]http://www.simple-talk.com/sql/performance/finding-the-causes-of-poor-performance-in-sql-server,-part-2/[/url](both of which I have referred you to before)</description><pubDate>Sat, 24 Nov 2012 02:09:28 GMT</pubDate><dc:creator>GilaMonster</dc:creator></item><item><title>RE: need one doubt clarification application team trying to execute a simple query</title><link>http://www.sqlservercentral.com/Forums/Topic1388027-360-1.aspx</link><description>You are not providing nearly enough info to enable us to effectively help you. Post the slow query, all table definitons (including indexes) for tables involved in the query and the actual execution plan for the query.Please read this article:[u][url=http://www.sqlservercentral.com/articles/SQLServerCentral/66909/]How to Post Performance Problems By Gail Shaw[/url][/u]</description><pubDate>Fri, 23 Nov 2012 22:38:48 GMT</pubDate><dc:creator>opc.three</dc:creator></item><item><title>need one doubt clarification application team trying to execute a simple query</title><link>http://www.sqlservercentral.com/Forums/Topic1388027-360-1.aspx</link><description>hi allneed one doubt clarificationapplication team trying to execute a simple querybut its taking long timei tried evry thingsuppose if we rebuild the indexes of the table in a database which the query is using !wiill it be any impact on the production server performanceor after rebuilding the table wheter we have to rearrrange the colums of the table which previous ly having?can we rebuild the index if we do so will it increase performance of the query</description><pubDate>Thu, 22 Nov 2012 22:29:57 GMT</pubDate><dc:creator>naga.rohitkumar</dc:creator></item></channel></rss>